Feature/update di container
Context
- We want our packages to stay up to date.
- This pr updates our DI container to the highest version of the Symfony DI package before it requires PHP 8.0.
[!IMPORTANT] Take not this PR needs to be merged together with https://github.com/Yoast/wordpress-seo-local/pull/2554 Also take a look at the source issue for linked in this PR for more next steps when we are merging this.
Summary
This PR can be summarized in the following changelog entry:
- Updates the
symfony/dependency-injectionpackage to version 5.4
Relevant technical choices:
To make this work I needed to make a couple of changes. The first change was to also include some new files in our php-scoper which are located in config/php-scoper/service-contracts.inc.php these files are needed for the DI container to compile so we need them to be copied over in our scoper.
The second change made was to mark src/introductions/infrastructure/introductions-seen-repository.php as @makePublic. This is needed because with this update the default behavior for new classes that live in Free and are used in any addon + premium is to be marked as public(false). This means that they are not included in the DI containers public classes. Which in practical terms means that YoastSEO()->classes->get('...') no longer works. We want this since we do not want our entire codebase to be public API.
This has no affect on existing classes which are located in folders that are included in the list in /config/dependency-injection/loader-pass.php in the process_definition method.
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
- This change should have no impact. But we need to smoke test premium + all addons to make sure everything still functions as expected. To do this you need to include this feature branch in the addon with the command:
composer require yoast/wordpress-seo:"dev-feature/update-di-container@dev as dev-release/24.8@dev" --devFor premium you just need:composer require yoast/wordpress-seo:"dev-feature/update-di-container@dev as dev-release/24.8@dev"
Relevant test scenarios
- [ ] Changes should be tested with the browser console open
- [ ] Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
- [ ] Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
- [ ] Changes should be tested on different browsers
- [ ] Changes should be tested on multisite
Test instructions for QA when the code is in the RC
- [X] QA should use the same steps as above.
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
- [ ] This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.
Other environments
- [ ] This PR also affects Shopify. I have added a changelog entry starting with
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.
Documentation
- [ ] I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.
Quality assurance
- [X] I have tested this code to the best of my abilities.
- [ ] During testing, I had activated all plugins that Yoast SEO provides integrations for.
- [ ] I have added unit tests to verify the code works as intended.
- [ ] If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
- [ ] I have written this PR in accordance with my team's definition of done.
- [ ] I have checked that the base branch is correctly set.
Innovation
- [ ] No innovation project is applicable for this PR.
- [ ] This PR falls under an innovation project. I have attached the
innovationlabel. - [ ] I have added my hours to the WBSO document.
Fixes #
composer.lock
Dev Package changes
| Package | Operation | From | To | About |
|---|---|---|---|---|
| symfony/polyfill-php81 | add | - | v1.33.0 | view code - License: MIT License |
| psr/container | upgrade | 1.0.0 | 1.1.1 | diff |
| symfony/config | upgrade | v3.4.32 | v5.4.46 | diff |
| symfony/dependency-injection | upgrade | v3.4.47 | v5.4.48 | diff |
| symfony/deprecation-contracts | upgrade | v2.5.2 | v2.5.4 | diff |
| symfony/filesystem | upgrade | v3.4.47 | v4.4.42 | diff |
| symfony/polyfill-ctype | upgrade | v1.31.0 | v1.33.0 | diff |
| symfony/polyfill-mbstring | upgrade | v1.27.0 | v1.33.0 | diff |
| symfony/polyfill-php80 | upgrade | v1.31.0 | v1.33.0 | diff |
| symfony/service-contracts | upgrade | v2.2.0 | v2.5.4 | diff |
Settings · Docs · Powered by Private Packagist
Pull Request Test Coverage Report for Build 67755dd3a5a859cd5f83bf0af71fd093a94d0c6b
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.5%) to 52.947%
| Totals | |
|---|---|
| Change from base Build c6d263007d8ea06ac20b6f2f6aecf543f699ab5c: | -0.5% |
| Covered Lines: | 31678 |
| Relevant Lines: | 59960 |
💛 - Coveralls
A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.
The composer.lock diff comment has been updated to reflect new changes in this PR.
A merge conflict has been detected for the proposed code changes in this PR. Please resolve the conflict by either rebasing the PR or merging in changes from the base branch.
The composer.lock diff comment has been updated to reflect new changes in this PR.
The composer.lock diff comment has been updated to reflect new changes in this PR.
Any chance this will see a release soon @josevarghese? Thank you.
The composer.lock diff comment has been updated to reflect new changes in this PR.