Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove manual install #645

Merged
merged 5 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .github/workflows/build-release.yml

This file was deleted.

10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ It's focused on providing a highly robust S3 interface with no "bells and whistl

## Getting Set Up

### Install Using Composer
S3 Uploads requires installation via Composer:

```
composer require humanmade/s3-uploads
Expand All @@ -49,13 +49,7 @@ composer require humanmade/s3-uploads
require_once __DIR__ . '/vendor/autoload.php';
```

### Install Manually

If you do not use Composer to manage plugins or other dependencies, you can install the plugin manually. Download the `manual-install.zip` file from the [Releases page](https://github.com/humanmade/S3-Uploads/releases) and extract the ZIP file to your `plugins` directory.

You can also `git clone` this repository, and run `composer install` in the plugin folder to pull in its dependencies.

---
## Configuration

Once you've installed the plugin, add the following constants to your `wp-config.php`:

Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
},
"authors": [
{
"name":"Human Made Limited",
"email":"support@humanmade.co.uk",
"homepage":"http://hmn.md/"
"name": "Human Made",
"homepage": "https://humanmade.com/"
}
],
"support": {
Expand Down
4 changes: 2 additions & 2 deletions inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
function init() {
// Ensure the AWS SDK can be loaded.
if ( ! class_exists( '\\Aws\\S3\\S3Client' ) ) {
// Require AWS Autoloader file.
require_once dirname( __DIR__ ) . '/vendor/autoload.php';
trigger_error( 'S3 Uploads requires the AWS SDK. Ensure Composer dependencies have been loaded.', E_USER_WARNING );
return;
}

if ( ! check_requirements() ) {
Expand Down
5 changes: 4 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
require '/wp-phpunit/includes/functions.php';

function _manually_load_plugin() {
require dirname( __FILE__ ) . '/../s3-uploads.php';
if ( file_exists( dirname( __DIR__ ) . '/vendor/autoload.php' ) ) {
require dirname( __DIR__ ) . '/vendor/autoload.php';
}
require dirname( __DIR__ ) . '/s3-uploads.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );

Expand Down