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

Fixes #3005 Namespace our dependencies to prevent conflicts #3008

Merged
merged 23 commits into from
Aug 25, 2020

Conversation

remyperona
Copy link
Contributor

@remyperona remyperona commented Aug 19, 2020

Fixes #3005 and closes #2126

Following issue #3003, and to prevent possible conflicts in the future, use Mozart to automatically import and namespace our dependencies.

Also regenerate the advanced-cache.php file on update to comply with the new path and name of the mobile detect library.

Imported Dependencies

  • matthiasmullie/minify & matthiasmullie/path-converter (Minification library, used in other minification plugins)
  • mobiledetect/mobiledetectlib (Mobile Detect library, very commonly used)
  • wp-media/background-processing (WP Background Processing library, commonly used in various plugins)
  • wp-media/rocket-lazyload-common (Used in WP Rocket and the lazyload plugin)

@remyperona remyperona added type: enhancement Improvements that slightly enhance existing functionality and are fast to implement dev initiative labels Aug 19, 2020
@remyperona remyperona added this to the 3.7 milestone Aug 19, 2020
@remyperona remyperona self-assigned this Aug 19, 2020
@remyperona remyperona marked this pull request as ready for review August 21, 2020 14:07
@remyperona remyperona linked an issue Aug 21, 2020 that may be closed by this pull request
composer.json Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
composer.json Show resolved Hide resolved
inc/deprecated/3.7.php Show resolved Hide resolved
@hellofromtonya
Copy link
Contributor

hellofromtonya commented Aug 24, 2020

@Tabrisrp There are multiple places in Rocket where MatthiasMullie\Minify, MatthiasMullie\Minify\CSS, and MatthiasMullie\Minify\JS are imported including in the inc/Engine/Optimization and inc/Engine/Media folders.

Update: Whoops never mind. Those got fixed in commits that I hadn't pulled down yet. Doh.

@remyperona
Copy link
Contributor Author

remyperona commented Aug 24, 2020

@hellofromtonya All of them should have been updated in this PR, I can't find any reference left when doing a search in the directory, can you?

@hellofromtonya
Copy link
Contributor

@Tabrisrp Sorry about that. I hadn't pulled down the latest commits. Doh.

All good. 👍

@hellofromtonya
Copy link
Contributor

@Davidacu This one is the last one for Alpha 3. It's ready for QA.

@Davidacu
Copy link

I ran into an error after doing composer install --no-dev
image

Copy link

@Davidacu Davidacu left a comment

Choose a reason for hiding this comment

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

  • Regression tests on Activation/Deactivation, Minification/Combine, Lazyload, Cache, Preload and Optimize CSS Delivery, Find the results attached, 99% pass rate, the failed case is known.
    testrail-report-21.pdf
  • Installed with Woocomerce 4.4, all ok 👍
  • Tested with Elementor plugin installed which loads WP_Background_Process , all ok 👍
  • Tested with other plugins that make use of the imported dependencies such as Mobile detect and Fast velocity minify, all good 👍
  • No notices or errors found in debug log.

@hellofromtonya hellofromtonya merged commit cfe483d into develop Aug 25, 2020
@hellofromtonya hellofromtonya deleted the fix/3005-namespace-dependencies branch August 25, 2020 18:56
@remyperona remyperona linked an issue Aug 28, 2020 that may be closed by this pull request
@dodgepong
Copy link

@Davidacu Hey there, I ran into the same error today when installing with --no-dev. What did you do to resolve that?

@iCaspar
Copy link
Contributor

iCaspar commented Sep 22, 2020

@dodgepong If I recall correctly, when running with --no-dev you also need --no-scripts
We only run Mozart in development to create the package namespacing, not in production.

@dodgepong
Copy link

@iCaspar Thanks, that did it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev initiative type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Projects
None yet
6 participants