Skip to content

PHP 8.2 Support #728

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

Merged
merged 6 commits into from
Dec 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/[email protected]"
with:
php-version: '8.1'
php-version: '8.2'
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
dbal-version:
- "2.13.0"
- "3.3.0"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/[email protected]"
with:
php-version: '8.1'
php-version: '8.2'
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
}
},
"require": {
"php": "^7.4 || ~8.0.0 || ~8.1.0",
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0",
"ext-json": "*",
"doctrine/dbal": "^2.13.7 || ^3.3.2",
"doctrine/doctrine-laminas-hydrator": "^3.0.0",
"doctrine/doctrine-module": "^5.2.0",
"doctrine/doctrine-module": "^5.3.0",
"doctrine/event-manager": "^1.1.1",
"doctrine/orm": "^2.11.1",
"doctrine/persistence": "^2.3.0 || ^3.0.0",
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ parameters:
-
message: '#Parameter \#1 .* of method DoctrineORMModule\\Options\\Configuration.* stdClass given#'
path: tests/Options/ConfigurationOptionsTest.php
-
message: '#Parameter \#1 .* of method Doctrine\\Common\\DataFixtures\\Executor\\ORMExecutor::execute\(\)#'
path: tests/Paginator/AdapterTest.php
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon

1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0"?>
<psalm
errorLevel="4"
phpVersion="8.0"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
Expand Down
1 change: 1 addition & 0 deletions src/CliConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ private function getObjectManagerName(): string
return $this->defaultObjectManagerName;
}

/** @psalm-suppress ReservedWord */
return $arguments->getParameterOption('--object-manager');
}

Expand Down
1 change: 1 addition & 0 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ static function (EventInterface $event): void {
->getEventManager()
->attach(
ProfilerEvent::EVENT_PROFILER_INIT,
/** @param EventInterface $event */
static function ($event): void {
$container = $event->getTarget()->getParam('ServiceManager');
$container->get('doctrine.sql_logger_collector.orm_default');
Expand Down
9 changes: 7 additions & 2 deletions src/Paginator/Adapter/DoctrinePaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ public function getPaginator(): Paginator
/**
* {@inheritDoc}
*
* @psalm-return ArrayIterator<TKey, TValue>
* @param int|null $offset
* @param int|null $itemCountPerPage
*
* @return ArrayIterator<TKey, TValue>
*
* @psalm-suppress LessSpecificImplementedReturnType
*/
public function getItems($offset, $itemCountPerPage)
{
Expand All @@ -70,7 +75,7 @@ public function count(): int
}

/**
* @return array{select: string, count_select: int}
* @return array{select: list<string>|string, count_select: int}
*/
public function jsonSerialize(): array
{
Expand Down
2 changes: 2 additions & 0 deletions src/Service/ConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ final class ConfigurationFactory extends DoctrineConfigurationFactory
/**
* {@inheritDoc}
*
* @param string $requestedName
*
* @return Configuration
*/
public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?array $options = null)
Expand Down
2 changes: 2 additions & 0 deletions src/Service/DBALConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public function __construct(string $name)
/**
* {@inheritDoc}
*
* @param string $requestedName
*
* @return Configuration
*/
public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?array $options = null)
Expand Down
2 changes: 2 additions & 0 deletions src/Service/DBALConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ final class DBALConnectionFactory extends AbstractFactory
/**
* {@inheritDoc}
*
* @param string $requestedName
*
* @return Connection
*/
public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?array $options = null)
Expand Down
2 changes: 2 additions & 0 deletions src/Service/EntityManagerAliasCompatFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ final class EntityManagerAliasCompatFactory implements FactoryInterface
* @deprecated this method was introduced to allow aliasing of service `Doctrine\ORM\EntityManager`
* from `doctrine.entitymanager.orm_default`
*
* @param string $requestedName
*
* @return EntityManager
*/
public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?array $options = null)
Expand Down
2 changes: 2 additions & 0 deletions src/Service/EntityManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ final class EntityManagerFactory extends AbstractFactory
/**
* {@inheritDoc}
*
* @param string $requestedName
*
* @return EntityManager
*/
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)
Expand Down
2 changes: 2 additions & 0 deletions src/Service/MappingCollectorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ final class MappingCollectorFactory extends AbstractFactory
/**
* {@inheritDoc}
*
* @param string $requestedName
*
* @return MappingCollector
*/
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)
Expand Down
3 changes: 3 additions & 0 deletions src/Service/MigrationsCommandFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function __construct(string $name)
/**
* {@inheritDoc}
*
* @param string $requestedName
*
* @return DoctrineCommand
*
* @throws InvalidArgumentException
Expand Down Expand Up @@ -109,6 +111,7 @@ private function getObjectManagerName(): string
return $this->defaultObjectManagerName;
}

/** @psalm-suppress ReservedWord */
return $arguments->getParameterOption('--object-manager');
}
}
2 changes: 2 additions & 0 deletions src/Service/ObjectMultiCheckboxFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ final class ObjectMultiCheckboxFactory implements FactoryInterface
/**
* {@inheritDoc}
*
* @param string $requestedName
*
* @return ObjectMultiCheckbox
*/
public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?array $options = null)
Expand Down
2 changes: 2 additions & 0 deletions src/Service/ObjectRadioFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ final class ObjectRadioFactory implements FactoryInterface
/**
* {@inheritDoc}
*
* @param string $requestedName
*
* @return ObjectRadio
*/
public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?array $options = null)
Expand Down
2 changes: 2 additions & 0 deletions src/Service/ObjectSelectFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ final class ObjectSelectFactory implements FactoryInterface
/**
* {@inheritDoc}
*
* @param string $requestedName
*
* @return ObjectSelect
*/
public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?array $options = null)
Expand Down