Skip to content

Conversation

@stobrien89
Copy link
Member

@stobrien89 stobrien89 commented Jun 1, 2022

Description of changes:

In response to requests in #2420, #2369, #808.

A composer script which runs at pre-autoload-dump. Removes AWS services that aren't specified by the user in their composer.json file. Usage is as follows:

 "require": {
        "aws/aws-sdk-php": "<version>",
    },
    "scripts": {
        "pre-autoload-dump": "Aws\\Script\\Composer\\Composer::removeUnusedServices"
    },
    "extra": {
        "aws/aws-sdk-php": [
            "S3"
        ]
    }
}

For this example, running composer install or composer update will remove all AWS services but S3. More information can be found in the ReadMe.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@akondas
Copy link

akondas commented Jun 12, 2022

How can I help to move this forward. I really need this feature. Thanks 🍻

@aws aws deleted a comment from SamRemis Jun 13, 2022
@stobrien89 stobrien89 force-pushed the remove-unused-services branch from 1ff557b to da00929 Compare June 13, 2022 21:28
Copy link

@akondas akondas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's go 🚀

@stobrien89 stobrien89 merged commit 2400a5a into aws:master Jul 5, 2022
@akondas
Copy link

akondas commented Jul 6, 2022

Release it 🚀 🙏

@kayw-geek
Copy link
Contributor

kayw-geek commented Sep 28, 2022

Description of changes:

In response to requests in #2420, #2369, #808.

A composer script which runs at pre-autoload-dump. Removes AWS services that aren't specified by the user in their composer.json file. Usage is as follows:

 "require": {
        "aws/aws-sdk-php": "<version>",
    },
    "scripts": {
        "pre-autoload-dump": "Aws\\Script\\Composer\\Composer::removeUnusedServices"
    },
    "extra": {
        "aws/aws-sdk-php": [
            "S3"
        ]
    }
}

For this example, running composer install or composer update will remove all AWS services but S3. More information can be found in the ReadMe.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Excuse me, I want to know the best practice of the feature, this feature had some risk now. for example, I cannot to know packages of project depend have which depend on AWS services, if you have a good suggestion?

@stobrien89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants