Deprecated warnings in PHP 8.2
- Dominant language
- PHP
- Stars
- 500
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Warning logs
```
[2025-10-30T16:51:17.688343-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Paths::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Paths.php","line":186} []
[2025-10-30T16:51:17.688747-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Paths::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Paths.php","line":197} []
[2025-10-30T16:51:17.689014-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Paths::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Paths.php","line":208} []
[2025-10-30T16:51:17.689207-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Paths::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Paths.php","line":218} []
[2025-10-30T16:51:17.689431-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Paths::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Paths.php","line":229} []
[2025-10-30T16:51:17.689516-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Paths::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Paths.php","line":239} []
[2025-10-30T16:51:17.689789-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Responses::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Responses.php","line":176} []
[2025-10-30T16:51:17.690206-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Responses::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Responses.php","line":187} []
[2025-10-30T16:51:17.690363-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Responses::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Responses.php","line":198} []
[2025-10-30T16:51:17.690539-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Responses::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Responses.php","line":208} []
[2025-10-30T16:51:17.690608-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Responses::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Responses.php","line":219} []
[2025-10-30T16:51:17.690770-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\spec\Responses::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/spec/Responses.php","line":229} []
[2025-10-30T16:51:17.691040-03:00] API.NOTICE: PHP Notice: Return type of cebe\openapi\json\JsonReference::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice {"severity":"E_DEPRECATED","file":"/var/www/vendor/cebe/php-openapi/src/json/JsonReference.php","line":129} []
```
composer show command
```
root@e22d479c12fd:/var/www# composer show
cebe/php-openapi 1.6.0 Read and write OpenAPI yaml/json files and make the content accessable in PHP objects.
devizzent/cebe-php-openapi 1.0.3 Read and write OpenAPI yaml/json files and make the content accessable in PHP objects.
fig/http-message-util 1.1.5 Utility classes and constants for use with PSR-7 (psr/http-message)
graham-campbell/result-type 1.1.3 An Implementation Of The Result Type
justinrainbow/json-schema 5.3.0 A library to validate a json schema.
laravel/serializable-closure 2.0.6 Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.
league/openapi-psr7-validator 0.22 Validate PSR-7 messages against OpenAPI (3.0.2) specifications expressed in YAML or JSON
league/uri 7.5.1 URI manipulation library
league/uri-interfaces 7.5.0 Common interfaces and classes for URI representation and interaction
monolog/monolog 3.9.0 Sends your logs to files, sockets, inboxes, databases and various web services
nikic/fast-route 1.3.0 Fast request router for PHP
php-di/invoker 2.3.7 Generic and extensible callable invoker
php-di/php-di 7.1.1 The dependency injection container for humans
phpoption/phpoption 1.9.4 Option Type for PHP
pimple/pimple 3.5.0 Pimple, a simple Dependency Injection Container
psr/cache 3.0.0 Common interface for caching libraries
psr/container 2.0.2 Common Container Interface (PHP FIG PSR-11)
psr/http-factory 1.1.0 PSR-17: Common interfaces for PSR-7 HTTP message factories
psr/http-message 2.0 Common interface for HTTP messages
psr/http-server-handler 1.0.2 Common interface for HTTP server-side request handler
psr/http-server-middleware 1.0.2 Common interface for HTTP server-side middleware
psr/log 3.0.2 Common interface for logging libraries
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
respect/stringifier 0.2.0 Converts any value to a string
respect/validation 2.4.4 The most awesome validation engine ever created for PHP
riverline/multipart-parser 2.2.0 One class library to parse multipart content with encoding and charset support.
slim/psr7 1.7.1 Strict PSR-7 implementation
slim/slim 4.15.0 Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs
symfony/deprecation-contracts 3.6.0 A generic function and convention to trigger deprecation notices
symfony/polyfill-ctype 1.33.0 Symfony polyfill for ctype functions
symfony/polyfill-mbstring 1.33.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php80 1.33.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/yaml 6.4.26 Loads and dumps YAML files
vlucas/phpdotenv 5.6.2 Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
webmozart/assert 1.12.1 Assertions to validate method input/output with nice error messages.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the cebe/openapi Paths.php, Responses.php, and JsonReference.php files named in the warnings, then compare their method signatures with the PHP 8.2 interfaces listed in the issue. Check the project tests or PHP compatibility setup before making changes. Done means the reported deprecation warnings no longer appear under PHP 8.2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100