Skip to content

Commit

Permalink
Merge branch hotfix/v2.3.19
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Jul 12, 2024
1 parent 6d9f7b1 commit 43f49aa
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 204 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install Dependencies
run: composer install --no-scripts --no-ansi --no-interaction --no-progress
- name: Run PHPUnit tests
run: vendor/bin/phpunit -v --bootstrap=tests/bootstrap.php --whitelist ./src --coverage-clover ./build/logs/clover.xml tests/
run: vendor/bin/phpunit -v --whitelist ./src tests
- name: Run PHP Code Sniffer
run: vendor/bin/phpcs -p ./src
- name: Run PHPStan
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#
# Roadiz
#
/pimple.json

# Ignore Google webmaster tool verification
/google*.html
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2023 Ambroise Maupate
Copyright © 2024 Ambroise Maupate

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
10 changes: 0 additions & 10 deletions Makefile

This file was deleted.

21 changes: 13 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
],
"require": {
"php": ">=8.1",
"doctrine/orm": "~2.17.0",
"doctrine/orm": "~2.19.0",
"jms/serializer": "^3.9.0",
"symfony/string": "5.4.*",
"symfony/translation-contracts": "^2.3",
"symfony/http-foundation": "5.4.*",
"symfony/serializer": "5.4.*",
"symfony/validator": "5.4.*"
"symfony/string": "6.4.*",
"symfony/translation-contracts": "^3.0",
"symfony/http-foundation": "6.4.*",
"symfony/serializer": "6.4.*",
"symfony/validator": "6.4.*"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
Expand All @@ -38,6 +38,11 @@
"RZ\\Roadiz\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"RZ\\Roadiz\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
Expand All @@ -46,8 +51,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.2.x-dev",
"dev-develop": "2.3.x-dev"
"dev-master": "2.3.x-dev",
"dev-develop": "2.4.x-dev"
}
}
}
6 changes: 3 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
parameters:
level: max
level: 7
paths:
- src
excludePaths:
- */node_modules/*
- */bower_components/*
- */static/*
ignoreErrors:
- identifier: missingType.iterableValue
- identifier: missingType.generics
- '#unknown class Parsedown(Extra)?#'
- '#Instantiated class Memcached not found#'
- '#Instantiated class Redis not found#'
reportUnmatchedIgnoredErrors: false
checkGenericClassInNonGenericObjectType: false
checkMissingIterableValueType: false
12 changes: 6 additions & 6 deletions src/Bag/LazyParameterBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct()
* @param mixed|null $default
* @return mixed|null
*/
public function get(string $key, $default = null)
public function get(string $key, $default = null): mixed
{
if (!$this->ready) {
$this->populateParameters();
Expand All @@ -50,7 +50,7 @@ public function all(string $key = null): array
*
* @return bool
*/
public function has(string $key)
public function has(string $key): bool
{
if (!$this->ready) {
$this->populateParameters();
Expand All @@ -62,7 +62,7 @@ public function has(string $key)
/**
* @return array
*/
public function keys()
public function keys(): array
{
if (!$this->ready) {
$this->populateParameters();
Expand All @@ -75,7 +75,7 @@ public function keys()
* @return \ArrayIterator
*/
#[\ReturnTypeWillChange]
public function getIterator()
public function getIterator(): \ArrayIterator
{
if (!$this->ready) {
$this->populateParameters();
Expand All @@ -88,7 +88,7 @@ public function getIterator()
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
public function count(): int
{
if (!$this->ready) {
$this->populateParameters();
Expand All @@ -105,7 +105,7 @@ public function count()
*
* @return mixed
*/
public function filter(string $key, $default = null, int $filter = \FILTER_DEFAULT, $options = [])
public function filter(string $key, $default = null, int $filter = \FILTER_DEFAULT, $options = []): mixed
{
if (!$this->ready) {
$this->populateParameters();
Expand Down
39 changes: 0 additions & 39 deletions src/Core/AbstractEntities/AbstractDateTimedPositioned.php

This file was deleted.

3 changes: 3 additions & 0 deletions src/Core/AbstractEntities/LeafTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ trait LeafTrait
{
use PositionedTrait;

/**
* @return Collection<int, LeafInterface>
*/
public function getChildren(): Collection
{
return $this->children;
Expand Down
21 changes: 3 additions & 18 deletions src/Core/Handlers/AbstractHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

abstract class AbstractHandler
{
protected ObjectManager $objectManager;

/**
* @return ObjectManager
*/
Expand All @@ -18,22 +16,9 @@ public function getObjectManager(): ObjectManager
return $this->objectManager;
}

/**
* @param ObjectManager $objectManager
* @return static
*/
public function setObjectManager(ObjectManager $objectManager)
{
$this->objectManager = $objectManager;
return $this;
}

/**
* @param ObjectManager $objectManager
*/
public function __construct(ObjectManager $objectManager)
{
$this->objectManager = $objectManager;
public function __construct(
protected readonly ObjectManager $objectManager
) {
}

/**
Expand Down
4 changes: 0 additions & 4 deletions src/Core/Handlers/HandlerFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,5 @@

interface HandlerFactoryInterface
{
/**
* @param AbstractEntity $entity
* @return AbstractHandler
*/
public function getHandler(AbstractEntity $entity): AbstractHandler;
}
2 changes: 1 addition & 1 deletion src/Utils/StringHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static function variablize(?string $string): string

return (new UnicodeString($string))
->ascii()
->replaceMatches('#([^a-zA-Z0-9\.]+)#', ' ')
->replaceMatches('#([^a-zA-Z0-9]+)#', '_')
->snake()
->lower()
->trim('-')
Expand Down
Loading

0 comments on commit 43f49aa

Please sign in to comment.