-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from assetic-php/wip/php8.1
v3.0 - Support PHP 8.1
- Loading branch information
Showing
54 changed files
with
502 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
v3.0.0 (2022-02-22) | ||
------------------ | ||
|
||
Assetic v3 is another refresh of the project in order to keep the core lean and | ||
up to date with modern standards. More deprecated / abandoned filters have been | ||
removed and replaced with modern maintained alternatives. | ||
|
||
New filters are still recommended to be added in external packages and the core | ||
is to be kept as minimal as possible. | ||
|
||
### New features | ||
|
||
* Support for PHP 8.0 & PHP 8.1 | ||
* Support for `symfony/process: v6.x` | ||
* Added `Assetic\Filter\JavaScriptMinifierFilter` | ||
* Added `Assetic\Filter\CSSMinFilter` | ||
* Added `Assetic\Filter\StylesheetMinfyFilter` | ||
|
||
### BC breaks | ||
|
||
- Minimum PHP version required is now PHP 7.3 | ||
- Removed support for the unmaintained `mrclay/minify`, `patchwork/jsqueeze`, & `natxet/CssMin` packages in favour of `wikimedia/minify`. | ||
|
||
# Filters Removed: | ||
- `JSMinFilter` (use `JavaScriptMinifierFilter` instead) | ||
- `JSMinPlusFilter` (use `JavaScriptMinifierFilter` instead) | ||
- `JSqueezeFilter` (use `JavaScriptMinifierFilter` instead) | ||
- `CssMinFilter` (use `CssImportFilter` combined with the `CSSMinFilter` instead) | ||
- Abandoned for all intents and purposes; maintainer has not interacted with the project for four years at least, not even able to maintain the package in the first place (https://github.com/natxet/CssMin/issues/23#issuecomment-257352700). | ||
- Several long standing unresolved bugs in relatively common CSS use cases | ||
- `MinifyCssCompressorFilter` (use replacement for `CssMinFilter` above or use `StylesheetMinifyFilter` instead) | ||
- Abandoned, see: https://github.com/mrclay/minify/commit/0bc376980248f421c50b039beb869dd46cd9b043 | ||
- Considered replacing with https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port (last touched in 2018) but it is not fully supported in PHP 7.4: https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/issues/57 & is abandoned for all intents and purporses; maintainer has not interacted with the project for four years at least and maintainer seems to no longer be working with PHP in general. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
bootstrap="./tests/bootstrap.php" | ||
colors="true" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd" | ||
> | ||
<testsuites> | ||
<testsuite name="Assetic Test Suite"> | ||
<directory suffix="Test.php">./tests/Assetic/Test/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">./src/Assetic/</directory> | ||
</whitelist> | ||
</filter> | ||
|
||
<php> | ||
<server name="NODE_PATH" value="./node_modules/"/> | ||
</php> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./tests/bootstrap.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">./src/Assetic/</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Assetic Test Suite"> | ||
<directory suffix="Test.php">./tests/Assetic/Test/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<server name="NODE_PATH" value="./node_modules/"/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php namespace Assetic\Asset\Iterator; | ||
|
||
use RecursiveFilterIterator; | ||
|
||
/** | ||
* Asset collection filter iterator. | ||
* | ||
|
@@ -8,7 +10,7 @@ | |
* | ||
* @author Kris Wallsmith <[email protected]> | ||
*/ | ||
class AssetCollectionFilterIterator extends \RecursiveFilterIterator | ||
class AssetCollectionFilterIterator extends RecursiveFilterIterator | ||
{ | ||
private $visited; | ||
private $sources; | ||
|
@@ -36,7 +38,7 @@ public function __construct(AssetCollectionIterator $iterator, array $visited = | |
* | ||
* @return Boolean Returns true if we have not seen this asset yet | ||
*/ | ||
public function accept() | ||
public function accept(): bool | ||
{ | ||
$asset = $this->getInnerIterator()->current(true); | ||
$duplicate = false; | ||
|
@@ -66,7 +68,7 @@ public function accept() | |
/** | ||
* Passes visited objects and source URLs to the child iterator. | ||
*/ | ||
public function getChildren() | ||
public function getChildren(): ?RecursiveFilterIterator | ||
{ | ||
return new self($this->getInnerIterator()->getChildren(), $this->visited, $this->sources); | ||
} | ||
|
Oops, something went wrong.