mirror of
https://github.com/mrclay/minify.git
synced 2025-08-11 16:44:44 +02:00
Merge pull request #714 from thirsch/feature/php84
Add support for php 8.4
This commit is contained in:
2
.github/workflows/php.yml
vendored
2
.github/workflows/php.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions:
|
php-versions:
|
||||||
["8.1", "8.2", "8.3"]
|
["8.1", "8.2", "8.3", "8.4"]
|
||||||
|
|
||||||
name: PHP ${{ matrix.php-versions }} Test on ubantu-latest
|
name: PHP ${{ matrix.php-versions }} Test on ubantu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@@ -85,7 +85,7 @@ class Minify
|
|||||||
* @param Minify_CacheInterface $cache
|
* @param Minify_CacheInterface $cache
|
||||||
* @param LoggerInterface $logger
|
* @param LoggerInterface $logger
|
||||||
*/
|
*/
|
||||||
public function __construct(Minify_CacheInterface $cache, LoggerInterface $logger = null)
|
public function __construct(Minify_CacheInterface $cache, ?LoggerInterface $logger = null)
|
||||||
{
|
{
|
||||||
$this->cache = $cache;
|
$this->cache = $cache;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
|
@@ -29,7 +29,7 @@ class Minify_Cache_File implements Minify_CacheInterface
|
|||||||
* @param bool $fileLocking
|
* @param bool $fileLocking
|
||||||
* @param LoggerInterface $logger
|
* @param LoggerInterface $logger
|
||||||
*/
|
*/
|
||||||
public function __construct($path = '', $fileLocking = false, LoggerInterface $logger = null)
|
public function __construct($path = '', $fileLocking = false, ?LoggerInterface $logger = null)
|
||||||
{
|
{
|
||||||
if (! $path) {
|
if (! $path) {
|
||||||
$path = sys_get_temp_dir();
|
$path = sys_get_temp_dir();
|
||||||
|
@@ -38,7 +38,7 @@ abstract class Minify_Controller_Base implements Minify_ControllerInterface
|
|||||||
* @param Minify_Source_Factory $sourceFactory
|
* @param Minify_Source_Factory $sourceFactory
|
||||||
* @param LoggerInterface $logger
|
* @param LoggerInterface $logger
|
||||||
*/
|
*/
|
||||||
public function __construct(Minify_Env $env, Minify_Source_Factory $sourceFactory, LoggerInterface $logger = null)
|
public function __construct(Minify_Env $env, Minify_Source_Factory $sourceFactory, ?LoggerInterface $logger = null)
|
||||||
{
|
{
|
||||||
$this->env = $env;
|
$this->env = $env;
|
||||||
$this->sourceFactory = $sourceFactory;
|
$this->sourceFactory = $sourceFactory;
|
||||||
|
@@ -163,7 +163,7 @@ class Minify_HTML_Helper
|
|||||||
* @return \Minify\App
|
* @return \Minify\App
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
public static function app(\Minify\App $app = null)
|
public static function app(?\Minify\App $app = null)
|
||||||
{
|
{
|
||||||
static $cached;
|
static $cached;
|
||||||
if ($app) {
|
if ($app) {
|
||||||
|
@@ -44,7 +44,7 @@ class Minify_Source_Factory
|
|||||||
* @param Minify_CacheInterface $cache Optional cache for handling .less files.
|
* @param Minify_CacheInterface $cache Optional cache for handling .less files.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function __construct(Minify_Env $env, array $options = array(), Minify_CacheInterface $cache = null)
|
public function __construct(Minify_Env $env, array $options = array(), ?Minify_CacheInterface $cache = null)
|
||||||
{
|
{
|
||||||
$this->env = $env;
|
$this->env = $env;
|
||||||
$this->options = array_merge(array(
|
$this->options = array_merge(array(
|
||||||
|
@@ -108,7 +108,7 @@ class Cli
|
|||||||
* @return Arg
|
* @return Arg
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function addArgument($letter, $required, Arg $arg = null)
|
public function addArgument($letter, $required, ?Arg $arg = null)
|
||||||
{
|
{
|
||||||
if (! preg_match('/^[a-zA-Z]$/', $letter)) {
|
if (! preg_match('/^[a-zA-Z]$/', $letter)) {
|
||||||
throw new InvalidArgumentException('$letter must be in [a-zA-Z]');
|
throw new InvalidArgumentException('$letter must be in [a-zA-Z]');
|
||||||
|
Reference in New Issue
Block a user