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

@import rules aren't combined into the minified CSS files #3539

Closed
4 tasks
GeekPress opened this issue Feb 1, 2021 · 7 comments · Fixed by #3603
Closed
4 tasks

@import rules aren't combined into the minified CSS files #3539

GeekPress opened this issue Feb 1, 2021 · 7 comments · Fixed by #3603
Assignees
Labels
effort: [M] 3-5 days of estimated development time module: file optimization priority: high Issues which should be resolved as quickly as possible severity: major Feature is not working as expected and no work around available type: bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@GeekPress
Copy link
Contributor

Describe the bug
When the minify CSS option is turned on, the @import rules aren't combined into the current CSS file.

This is an important problem for performance:

  • it creates useless HTTP requests
  • The files needs to be preloaded to not decrease the PageSpeed Insight Grade

I did some tests on my side to know if the default behavior of the library was to combined @import rules.

The response is: YES

Please note that only internal @import rules are combined by the library. It means an @import rules from Google Fonts won't be merged.

I did a simple test on smashingcoding website. I minified this file which contains 2 @import rules:
http://smashingcoding.com/wp-content/plugins/forget-about-shortcode-buttons/public/css/button-styles.css

I used the last version of the library by using this code:

<?php
header('Content-type: text/css');
header('Cache-Control: max-age=31536000');

require_once 'minify/Minify.php';
require_once 'minify/CSS.php';
require_once 'path-converter/ConverterInterface.php';
require_once 'path-converter/Converter.php';

use MatthiasMullie\Minify;

$minifier = new Minify\CSS();
$minifier->add('wp-content/plugins/forget-about-shortcode-buttons/public/css/button-styles.css');

echo $minifier->minify();

The result is available here:
http://smashingcoding.com/minify.php

As you can notice the @import rules has been combined into the minified CSS file.

It means we have a problem into WP Rocket to be able to combine the @import rules.

/!\ The $maxImportSize variable doesn't have any relation with this problem. Increasing its value won't have any effect.

To Reproduce
Steps to reproduce the behavior:

  1. Go to smashingcoding.com
  2. Activate the Minify CSS option
  3. Check the source code of the CSS file which starts by http://smashingcoding.com/wp-content/cache/min/1/wp-content/plugins/forget-about-shortcode-buttons/public/css/button-styles-
  4. See error. The @import rules are still present

Expected behavior
The internal @import rules should be combined into the current CSS file.

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@GeekPress GeekPress added type: bug Indicates an unexpected problem or unintended behavior module: file optimization priority: high Issues which should be resolved as quickly as possible needs: grooming severity: major Feature is not working as expected and no work around available labels Feb 1, 2021
@engahmeds3ed engahmeds3ed added GROOMING IN PROGRESS Use this label when the issue is currently being groomed. and removed needs: grooming labels Feb 1, 2021
@engahmeds3ed
Copy link
Contributor

efb7b07

this commit is prototype for the proposed solution

Branch name: prototype/fix-internal-import

Note: This change required me to add new method inside minify package here:

public function addData( $path, $content ) {
$this->data[ $path ] = $content;
}

also I removed changing urls for import from our side at class WP_Rocket\Engine\Optimization\CSSTrait method: move ( we may use it only for external urls )

@wp-media/php plz validate

@remyperona
Copy link
Contributor

@engahmeds3ed Do you see a way of accomplishing the same goal, but without modifying the library code?

@engahmeds3ed
Copy link
Contributor

@Tabrisrp

I think we have two options here:-

  1. Pass the file path instead of content and then apply our filters after minification.
  2. duplicated the minify package's code and implement again the part of replacing import by contents.

for now I opened PR at the minify package here: matthiasmullie/minify#359
I hope he can check that soon (in case we took this approach)

what do u think?

@engahmeds3ed
Copy link
Contributor

@Tabrisrp I will try here to groom it by changing our code as it's major severity:-

Reproduce the problem
Yes I can see the issue locally and also our tests expect that behavior.

Identify the root cause
We don't send the source path with the content to minify package so it can't convert relative path to its absolute path then fails getting the import file contents.

Scope a solution
Change the following line

return apply_filters( 'rocket_css_content', $this->move( $this->get_converter( $source, $target ), $content, $source ), $source, $target );

to be

$content = $this->move( $this->get_converter( $source, $target ), $content, $source );

$content = $this->combine_imports( $content );

/**
 * Filters the content of a CSS file
 *
 * @since 3.4
 *
 * @param string $content CSS content.
 * @param string $source  Source filepath.
 * @param string $target  Target filepath.
 */
return apply_filters( 'rocket_css_content', $content, $source, $target );

Create the following method combine_imports on the same file

protected function combine_imports( $content ) {
	$importRegexes = array(
		// @import url(xxx)
		'/
		# import statement
		@import

		# whitespace
		\s+

			# open url()
			url\(

				# (optional) open path enclosure
				(?P<quotes>["\']?)

					# fetch path
					(?P<path>.+?)

				# (optional) close path enclosure
				(?P=quotes)

			# close url()
			\)

			# (optional) trailing whitespace
			\s*

			# (optional) media statement(s)
			(?P<media>[^;]*)

			# (optional) trailing whitespace
			\s*

		# (optional) closing semi-colon
		;?

		/ix',

		// @import 'xxx'
		'/

		# import statement
		@import

		# whitespace
		\s+

			# open path enclosure
			(?P<quotes>["\'])

				# fetch path
				(?P<path>.+?)

			# close path enclosure
			(?P=quotes)

			# (optional) trailing whitespace
			\s*

			# (optional) media statement(s)
			(?P<media>[^;]*)

			# (optional) trailing whitespace
			\s*

		# (optional) closing semi-colon
		;?

		/ix',
	);

	// find all relative imports in css
	$matches = array();
	foreach ($importRegexes as $importRegex) {
		if (preg_match_all($importRegex, $content, $regexMatches, PREG_SET_ORDER)) {
			$matches = array_merge($matches, $regexMatches);
		}
	}

	$search = array();
	$replace = array();

	// loop the matches
	foreach ($matches as $match) {
		// grab referenced file & minify it (which may include importing
		// yet other @import statements recursively)
		$importContent = $this->get_file_contents( $match['path'] );

		// check if this is only valid for certain media
		if (!empty($match['media'])) {
			$importContent = '@media '.$match['media'].'{'.$importContent.'}';
		}

		// add to replacement array
		$search[] = $match[0];
		$replace[] = $importContent;
	}

	// replace the import statements
	return str_replace($search, $replace, $content);
}

Add another method get_file_contents in the same file as follows:-

private function get_file_contents( $path ) {
	return rocket_direct_filesystem()->get_contents( $path );
}

Adjust the tests to accept the new behavior.

Question: this code will be applied before applying the minification itself so imports will be replaced by their contents so those imports won't get into top of the file as minification process won't see imports, I think this is the right behavior, if @wp-media/productrocket wants it to be at the top we will sort the matches on the previous code to be based on finding import keyword inside it.

Estimate the effort
[M]

@engahmeds3ed engahmeds3ed added effort: [M] 3-5 days of estimated development time and removed GROOMING IN PROGRESS Use this label when the issue is currently being groomed. labels Feb 15, 2021
@remyperona
Copy link
Contributor

Previously, @import needed to be moved to the top, because they are not interpreted if that's not the case. We don't need that anymore, since they are replaced by the actual content.

Question: why create a new method get_file_contents(), when we already have one from the AbstractOptimization class?

$content = $this->move( $this->get_converter( $source, $target ), $content, $source );

$content = $this->combine_imports( $content );

Shouldn't those be in the reverse order? We will want to update paths in the content found in the import too.

@GeekPress
Copy link
Contributor Author

Previously, @import needed to be moved to the top, because they are not interpreted if that's not the case. We don't need that anymore, since they are replaced by the actual content.

We will still have external @import not concern by this enhancement. Should we not keep the same behavior?

@engahmeds3ed
Copy link
Contributor

engahmeds3ed commented Feb 16, 2021

@Tabrisrp

Question: why create a new method get_file_contents(), when we already have one from the AbstractOptimization class?

Good question, I created this new method as we are on trait and this trait can be used at any class so for current situation we can use AbstractOptimization one.

Shouldn't those be in the reverse order? We will want to update paths in the content found in the import too.

You are totally right, I think when writing this code we need to test that carefully as I'm getting the file contents based on the new converted file path, so we can check that on implementation.

@GeekPress

We will still have external @import not concern by this enhancement. Should we not keep the same behavior?

Don't worry about external ones, we didn't touch them and they will be on the top as is.

@remyperona remyperona added this to the 3.8.6 milestone Feb 16, 2021
@remyperona remyperona mentioned this issue Feb 26, 2021
crystinutzaa added a commit that referenced this issue Mar 4, 2021
* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>
iCaspar added a commit that referenced this issue Mar 23, 2021
* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>
iCaspar added a commit that referenced this issue Mar 23, 2021
* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>
iCaspar added a commit that referenced this issue Mar 26, 2021
* Add Unit test Warmup/APIClient

* Add unit tests for Frontend APIClient

* Update comments with @uses for AbstractAPI coverage

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

* Exclude googleoptimize.com from minify/combine JS (PR #3609)

* Exclude www.idxhome.com from combine/defer JS (#3619)

* Exclude wcpv_registration_local from combine JS (PR #3634)

* Add additional inline JS exclusions from combine JS (PR #3638)

* Closes #2883 UI improvement for Never Cache URL placeholder (PR #3631)

* Bump elliptic from 6.5.3 to 6.5.4 (PR #3650)

Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](indutny/elliptic@v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fixes #3528 Add AMP query string to cached query strings when activating the plugin (PR #3613)

* Tiered Pricing Table for WooCommerce nonce action exclusion (PR #3652)

* Closes #2812 Add new filter to rewrite srcset to the CDN (PR #3648)

* Fixes #2041 CDN: prevent incorrect URL on srcset with duplicated relative URLS (PR #3615)

* Fixes #3114 Apply font-display:swap to CPCSS (PR #3633)

* Fixes #3073 Remove content from attributes list for WebP conversion (PR #3607)

* Fixes #3394 PHP notice in Update_Subscriber::disable_auto_updates() (PR #3632)

* update version to 3.8.7

* v3.8.6 (#3623)

* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>

* Fixes #3658 Force the PSR Container dependency to v1.0.0 (PR #3660)

* Add new inline JS exclusion from combine JS (PR #3683)

* Ignore Pinterest ads "pp" query string when serving the cache (PR #3682)

* Fix double space in renewal banner copy (PR #3674)

* Exclude reload_attached_coupons from combine JS (PR #3671)

* Exclude arf_footer_cl_logic_call from combine JS (PR #3665)

* Fix rest API tests fixtures (PR #3688)

* add details attribute to error data
* remove details attribute from error data and use assertArraySubset to make sure that needed attributes are there
* adjust the GH workflow to use WP 5.7
* adjust the GH workflow to use latest WP version always for non legacy

* Exclude nonce actions for Discount Rules and Dynamic Pricing for WooCommerce (PR #3679)

* update fixtures after typo fix

* Closes #3230 Add PHP 8 to our CI matrix (PR #3656)

* add PHP 8 to our CI matrix
* update composer configuration
* update phpstan-wp dependency version
* update phpunit package version
* update workflows
* only bailout if the provided structure is not empty
* update return typehint for setUp() and setUpBeforeClass()
* use Mockery for mocks instead of phpunit mocks
* remove separate process

* update version to 3.9-alpha1

* v3.8.6 (#3623)

* Update wording in first activation notice on the dashboard (PR #3583)

Add automatically to match the description on the website. Also without it it sounds like WP Rocket would not know how to deal with the remaining 20%.

* Fixes #3590 Imagify icon not shown in Chrome (PR #3591)

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in de_DE

translation completed updated for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Fixes #3498 Turn off "Delay JS" option when Safe Mode is activated (PR #3574)

* Fixes #3454 Delay JS is not working if scrolling the page with the mouse wheel (PR #3573)

* Closes #2839 Remove Age Verify plugin compatibility files (PR #3585)

* Closes #1744 Show warning when PageSpeed Ninja is active (PR #3580)

* Fixes #3238 Remove empty values in $purge_urls array (PR #3579)

* Fixes #2777 Update text formatting in Rocket Analytics modal (#3598)

* Closes #3113 Stop removing empty lines in the .htaccess (PR #3599)

* Fixes #3605 Replace deprecated jQuery methods (PR #3606)

* Translate /languages/rocket.pot in ru_RU

translation completed for the source file '/languages/rocket.pot'
on the 'ru_RU' language.

* Closes #3564 Update minified filename structure to use query string instead of version in filename (PR #3595)

* Fixes #3083 Update delay JS RegEx to ignore space inside script tags (PR #3587)

* Updating AWX webhook url

* Fixes #3576 Guard rocket_defer_inline_exclusions filter return when used by 3rd parties (PR #3582)

* Fixes #2970 Add new post-type exclusion "cms_block" from CPCSS generation (PR #3550)

* Closes #3423 Add preconnect tag for CDN URLs (#3463)

* Add add_preconnect_cdn() method

* Add integration test draft and notes.

* Implement preconnect for non-crossorigin cdn-urls

* Add fixture, adjust integration test

* Revise forcorrect cdn urls, use crossorigin second

* Run phpcbf

* Update CDN preconnect testcases

* Use agnostic scheme when not provided

* Rerun phpcs

* Clean dns-prefetch out of testcases :)

* Add testcase/solution for `test/tests`

* Closes #3539 Combine @import rules into the minified CSS files (PR #3603)

* update plugin version

* update pot file with changed strings

* Translate /languages/rocket.pot in de_DE

translation completed for the source file '/languages/rocket.pot'
on the 'de_DE' language.

* Translate /languages/rocket.pot in fr_FR

translation completed for the source file '/languages/rocket.pot'
on the 'fr_FR' language.

* Fix #3625 Contact form 7 stop working if dependency scripts are deferred after latest update (PR #3629)

* exclude files from being deferred
* add hooks script to the exclude list

* update translations

* Translate /languages/rocket.pot in tr_TR

translation completed for the source file '/languages/rocket.pot'
on the 'tr_TR' language.

Co-authored-by: Presskopp <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: Caspar Green <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>

* Add integration test for Warmup\APIClient

* Adjust Warmup\APIClient fixture

* Adjust Warmup\APIClient unit test w/new fixture

* Add integration test Frontend\APIClient

* Modify Frontend\APIClient fixture for new test.

* Fix warmup APIClient fixture WPError case

* Add remaining testcases for Frontend APIClient

* Use actual returmed error codes in APIClients

* Refactor check_response()

* Refactor Unit tests for new Fixture

* Clean up fixture

* Refactor Warmup API Unit test for check_response()

* Restore odd removals

* Don’t alias Brain\Monkey\Functions

Co-authored-by: Vasilis Manthos <[email protected]>
Co-authored-by: Albert Cintas <[email protected]>
Co-authored-by: Ahmed Saed <[email protected]>
Co-authored-by: Sandy Figueroa <[email protected]>
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: Adame Dahmani <[email protected]>
Co-authored-by: Jorge <[email protected]>
Co-authored-by: Scott Hartley <[email protected]>
Co-authored-by: Natalia Drause <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: Presskopp <[email protected]>
Co-authored-by: Jonathan Buttigieg <[email protected]>
Co-authored-by: Soponar Cristina <[email protected]>
Co-authored-by: Cristina Soponar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: [M] 3-5 days of estimated development time module: file optimization priority: high Issues which should be resolved as quickly as possible severity: major Feature is not working as expected and no work around available type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants