spiral / framework

High-Performance PHP Framework
https://spiral.dev
MIT License
1.82k stars 89 forks source link

Recursive proxy detected for `Spiral\Session\SessionFactoryInterface` in `root` scope #1148

Closed alexander-schranz closed 2 months ago

alexander-schranz commented 2 months ago

Description

After an upgrade (just composer update) I run into the following issue:

1) Tests\SearchControllerTest::testDefaultActionWorks
Received response status code [500 : ] but expected 200. Body: [Spiral\Core\Exception\Container\RecursiveProxyException]
Recursive proxy detected for `Spiral\Session\SessionFactoryInterface` in `root` scope. in vendor/spiral/framework/src/Core/src/Internal/Proxy/Resolver.php:44

How To Reproduce

https://github.com/schranz-search/schranz-search/tree/0.5/.examples/spiral

git clone https://github.com/schranz-search/schranz-search schranz-search
cd schranz-search
cd .examples/spiral
composer update

docker compose up

composer test
composer test -- --filter="SearchControllerTest"

Additional Info

Q A
Framework Version 3.14.3
PHP version 8.2.21
Operating system MacOS
compose info ``` alexkart/curl-builder 1.0.9 PSR-7 compatible curl builder. algolia/algoliasearch-client-php 3.4.1 Algolia Search API Client for PHP amphp/amp 2.6.4 A non-blocking concurrency framework for PHP applications. amphp/byte-stream 1.8.2 A stream abstraction to make working with non-blocking I/O simple. brick/math 0.12.1 Arbitrary-precision arithmetic library cebe/markdown 1.2.1 A super fast, highly extensible markdown parser for PHP clue/stream-filter 1.7.0 A simple and modern approach to stream filtering in PHP cocur/slugify 4.6.0 Converts a string into a slug. codedungeon/php-cli-colors 1.12.2 Liven up you PHP Console Apps with standard colors composer/pcre 3.3.1 PCRE wrapping library that offers type-safe preg_* replacements. composer/semver 3.4.2 Semver library that offers utilities, version constraint parsing and validation. composer/xdebug-handler 3.0.5 Restarts a process without Xdebug. defuse/php-encryption 2.4.0 Secure PHP Encryption Library dnoegel/php-xdg-base-dir 0.1.1 implementation of xdg base directory specification for php doctrine/cache 2.2.0 PHP Doctrine Cache library is a popular cache implementation that supports many different drivers ... doctrine/dbal 3.9.1 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspectio... doctrine/deprecations 1.1.3 A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable ... doctrine/event-manager 2.0.1 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various... doctrine/inflector 2.0.10 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upp... doctrine/lexer 3.0.1 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers. egulias/email-validator 4.0.2 A library for validating emails against several RFCs elastic/transport 8.10.0 HTTP transport PHP library for Elastic products elasticsearch/elasticsearch 8.15.0 PHP Client for Elasticsearch ezimuel/guzzlestreams 3.1.0 Fork of guzzle/streams (abandoned) to be used with elasticsearch-php ezimuel/ringphp 1.2.2 Fork of guzzle/RingPHP (abandoned) to be used with elasticsearch-php felixfbecker/advanced-json-rpc 3.2.1 A more advanced JSONRPC implementation felixfbecker/language-server-protocol 1.5.2 PHP classes for the Language Server Protocol fidry/cpu-core-counter 1.2.0 Tiny utility to get the number of CPU cores. google/common-protos 4.8.3 Google API Common Protos for PHP google/protobuf 4.28.1 proto library for PHP graham-campbell/result-type 1.1.3 An Implementation Of The Result Type grpc/grpc 1.57.0 gRPC library for PHP guzzlehttp/guzzle 7.9.2 Guzzle is a PHP HTTP client library guzzlehttp/promises 2.0.3 Guzzle promises library guzzlehttp/psr7 2.7.0 PSR-7 message implementation that also provides common utility methods halaxa/json-machine 1.1.4 Efficient, easy-to-use and fast JSON pull parser hamcrest/hamcrest-php 2.0.1 This is the PHP port of Hamcrest Matchers league/event 3.0.3 Event package league/flysystem 3.28.0 File storage abstraction for PHP league/flysystem-local 3.28.0 Local filesystem adapter for Flysystem. league/mime-type-detection 1.15.0 Mime-type detection for Flysystem loupe/loupe 0.6.9 A full text search engine with tokenization, stemming, typo tolerance, filters and geo support bas... masterminds/html5 2.9.0 An HTML5 parser and serializer. meilisearch/meilisearch-php 1.10.0 PHP wrapper for the Meilisearch API mjaschen/phpgeo 4.2.1 Simple Yet Powerful Geo Library mockery/mockery 1.6.12 Mockery is a simple yet flexible PHP mock object framework monolog/monolog 3.7.0 Sends your logs to files, sockets, inboxes, databases and various web services myclabs/deep-copy 1.12.0 Create deep copies (clones) of your objects netresearch/jsonmapper 4.5.0 Map nested JSON structures onto PHP classes nette/php-generator 4.1.6 🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.3 features. nette/utils 4.0.5 πŸ›  Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSO... nikic/php-parser 4.19.1 A PHP parser written in PHP nitotm/efficient-language-detector 2.1.2 Fast and accurate natural language detection. Detector written in PHP. Nito-ELD, ELD. nyholm/psr7 1.8.2 A fast PHP7 implementation of PSR-7 nyholm/psr7-server 1.1.0 Helper classes to handle PSR-7 server requests open-telemetry/api 1.0.3 API for OpenTelemetry PHP. open-telemetry/context 1.0.2 Context implementation for OpenTelemetry PHP. opensearch-project/opensearch-php 2.3.1 PHP Client for OpenSearch paragonie/random_compat 9.99.100 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7 phar-io/manifest 2.0.4 Component for reading phar.io manifest information from a PHP Archive (PHAR) phar-io/version 3.2.1 Library for handling version information and constraints php-cs-fixer/shim 3.64.0 A tool to automatically fix PHP code style php-http/client-common 2.7.1 Common HTTP Client implementations and tools for HTTPlug php-http/discovery 1.19.4 Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations php-http/httplug 2.4.0 HTTPlug, the HTTP client abstraction for PHP php-http/message 1.16.1 HTTP Message related tools php-http/promise 1.3.1 Promise used for asynchronous HTTP requests phpdocumentor/reflection-common 2.2.0 Common reflection classes used by phpdocumentor to reflect the code structure phpdocumentor/reflection-docblock 5.4.1 With this component, a library can provide support for annotations via DocBlocks or otherwise retr... phpdocumentor/type-resolver 1.8.2 A PSR-5 based resolver of Class names, Types and Structural Element Names phpoption/phpoption 1.9.3 Option Type for PHP phpstan/extension-installer 1.4.3 Composer plugin for automatic installation of PHPStan extensions phpstan/phpdoc-parser 1.30.1 PHPDoc parser with support for nullable, intersection and generic types phpstan/phpstan 1.12.3 PHPStan - PHP Static Analysis Tool phpstan/phpstan-phpunit 1.4.0 PHPUnit extensions and rules for PHPStan phpunit/php-code-coverage 10.1.16 Library that provides collection, processing, and rendering functionality for PHP code coverage in... phpunit/php-file-iterator 4.1.0 FilterIterator implementation that filters files based on a list of suffixes. phpunit/php-invoker 4.0.0 Invoke callables with a timeout phpunit/php-text-template 3.0.1 Simple template engine. phpunit/php-timer 6.0.0 Utility class for timing phpunit/phpunit 10.5.34 The PHP Unit Testing framework. psr/cache 3.0.0 Common interface for caching libraries psr/container 2.0.2 Common Container Interface (PHP FIG PSR-11) psr/event-dispatcher 1.0.0 Standard interfaces for event handling. psr/http-client 1.0.3 Common interface for HTTP clients 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 psr/simple-cache 3.0.0 Common interfaces for simple caching qossmic/deptrac-shim 1.0.2 deptrac phar distribution ralouphie/getallheaders 3.0.3 A polyfill for getallheaders. ramsey/collection 2.0.0 A PHP library for representing and manipulating collections. ramsey/uuid 4.7.6 A PHP library for generating and working with universally unique identifiers (UUIDs). react/promise 2.11.0 A lightweight implementation of CommonJS Promises/A for PHP rector/rector 1.2.5 Instant Upgrade and Automated Refactoring of any PHP code roadrunner-php/app-logger 1.2.0 Send log messages to RoadRunner roadrunner-php/centrifugo 2.2.0 RoadRunner: Centrifugo bridge roadrunner-php/lock 1.0.0 This package provides a PHP integration package for the RoadRunner Lock plugin, which allows for e... roadrunner-php/roadrunner-api-dto 1.9.0 RoadRunner PHP API schranz-search/seal 0.5.x-dev Search Engine Abstraction Layer schranz-search/seal-algolia-adapter 0.5.x-dev An adapter to support algolia in schranz-search/seal search abstraction. schranz-search/seal-elasticsearch-adapter 0.5.x-dev An adapter to support elasticsearch in schranz-search/seal search abstraction. schranz-search/seal-loupe-adapter 0.5.x-dev An adapter to support loupe in schranz-search/seal search abstraction. schranz-search/seal-meilisearch-adapter 0.5.x-dev An adapter to support meilisearch in schranz-search/seal search abstraction. schranz-search/seal-memory-adapter 0.5.x-dev An adapter to support to write into memory for schranz-search/seal search abstraction. schranz-search/seal-multi-adapter 0.5.x-dev An adapter to support to write into multiple other adapters schranz-search/seal package. schranz-search/seal-opensearch-adapter 0.5.x-dev An adapter to support opensearch in schranz-search/seal search abstraction. schranz-search/seal-read-write-adapter 0.5.x-dev An adapter to support to split read and write operations for the schranz-search/seal package. schranz-search/seal-redisearch-adapter 0.5.x-dev An adapter to support RediSearch in schranz-search/seal search abstraction. schranz-search/seal-solr-adapter 0.5.x-dev An adapter to support apache solr in schranz-search/seal search abstraction. schranz-search/seal-typesense-adapter 0.5.x-dev An adapter to support typesense in schranz-search/seal search abstraction. schranz-search/spiral-bridge 0.5.x-dev An integration of schranz-search search abstraction into Spiral Framework. sebastian/cli-parser 2.0.1 Library for parsing CLI options sebastian/code-unit 2.0.0 Collection of value objects that represent the PHP code units sebastian/code-unit-reverse-lookup 3.0.0 Looks up which function or method a line of code belongs to sebastian/comparator 5.0.2 Provides the functionality to compare PHP values for equality sebastian/complexity 3.2.0 Library for calculating the complexity of PHP code units sebastian/diff 5.1.1 Diff implementation sebastian/environment 6.1.0 Provides functionality to handle HHVM/PHP environments sebastian/exporter 5.1.2 Provides the functionality to export PHP variables for visualization sebastian/global-state 6.0.2 Snapshotting of global state sebastian/lines-of-code 2.0.2 Library for counting the lines of code in PHP source code sebastian/object-enumerator 5.0.0 Traverses array structures and object graphs to enumerate all referenced objects sebastian/object-reflector 3.0.0 Allows reflection of object attributes, including inherited and non-public ones sebastian/recursion-context 5.0.0 Provides functionality to recursively process PHP variables sebastian/type 4.0.0 Collection of value objects that represent the types of the PHP type system sebastian/version 4.0.1 Library that helps with managing the version number of Git-hosted PHP projects solarium/solarium 6.3.5 PHP Solr client spatie/array-to-xml 3.3.0 Convert an array to xml spiral-packages/league-event 1.0.1 The League Event bridge for Spiral Framework spiral-packages/yii-error-handler-bridge 1.1.2 Yii Error Handler integration package for Spiral Framework spiral/attributes 3.1.7 PHP attributes reader spiral/composer-publish-plugin 1.1.2 spiral/framework 3.14.3 Spiral, High-Performance PHP/Go Framework spiral/goridge 4.2.0 High-performance PHP-to-Golang RPC bridge spiral/nyholm-bridge 1.3.0 Spiral Framework: Nyholm PSR-7/PSR-17 bridge spiral/roadrunner 2024.2.1 RoadRunner: High-performance PHP application server and process manager written in Go and powered ... spiral/roadrunner-bridge 3.7.0 RoadRunner integration package spiral/roadrunner-cli 2.6.0 RoadRunner: Command Line Interface spiral/roadrunner-grpc 3.4.0 High-Performance GRPC server for PHP applications spiral/roadrunner-http 3.5.1 RoadRunner: HTTP and PSR-7 worker spiral/roadrunner-jobs 4.6.0 RoadRunner Queues (Jobs) plugin API library spiral/roadrunner-kv 4.3.0 RoadRunner kv plugin bridge spiral/roadrunner-metrics 3.2.0 RoadRunner: Prometheus metrics RPC spiral/roadrunner-tcp 4.1.0 RoadRunner: TCP worker spiral/roadrunner-worker 3.6.0 RoadRunner: PHP worker spiral/sapi-bridge 1.1.0 Spiral Framework SAPI bridge spiral/testing 2.8.0 Spiral Framework testing SDK symfony/console 7.1.4 Eases the creation of beautiful and testable command line interfaces symfony/css-selector 6.4.8 Converts CSS selectors to XPath expressions symfony/deprecation-contracts 3.5.0 A generic function and convention to trigger deprecation notices symfony/dom-crawler 6.4.8 Eases DOM navigation for HTML and XML documents symfony/event-dispatcher 7.1.1 Provides tools that allow your application components to communicate with each other by dispatchin... symfony/event-dispatcher-contracts 3.5.0 Generic abstractions related to dispatching event symfony/filesystem 7.1.2 Provides basic utilities for the filesystem symfony/finder 7.1.4 Finds files and directories via an intuitive fluent interface symfony/http-client 7.1.4 Provides powerful methods to fetch HTTP resources synchronously or asynchronously symfony/http-client-contracts 3.5.0 Generic abstractions related to HTTP clients symfony/mailer 7.1.2 Helps sending emails symfony/mime 7.1.4 Allows manipulating MIME messages symfony/options-resolver 7.1.1 Provides an improved replacement for the array_replace PHP function symfony/polyfill-ctype 1.31.0 Symfony polyfill for ctype functions symfony/polyfill-iconv 1.31.0 Symfony polyfill for the Iconv extension symfony/polyfill-intl-grapheme 1.31.0 Symfony polyfill for intl's grapheme_* functions symfony/polyfill-intl-idn 1.31.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions symfony/polyfill-intl-normalizer 1.31.0 Symfony polyfill for intl's Normalizer class and related functions symfony/polyfill-mbstring 1.31.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php72 1.31.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions symfony/polyfill-php80 1.31.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions symfony/polyfill-php81 1.31.0 Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions symfony/polyfill-php82 1.31.0 Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions symfony/polyfill-php83 1.31.0 Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions symfony/service-contracts 3.5.0 Generic abstractions related to writing services symfony/string 7.1.4 Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme cl... symfony/translation 7.1.3 Provides tools to internationalize your application symfony/translation-contracts 3.5.0 Generic abstractions related to translation symfony/var-dumper 6.4.11 Provides mechanisms for walking through any arbitrary PHP variable symfony/yaml 7.1.4 Loads and dumps YAML files theseer/tokenizer 1.2.3 A small library for converting tokenized PHP source code into XML and potentially other formats toflar/state-set-index 2.0.2 Implementation of the State Set Index Algorithm typesense/typesense-php 4.9.3 PHP client for Typesense Search Server: https://github.com/typesense/typesense vimeo/psalm 5.26.1 A static analysis tool for finding errors in PHP applications vlucas/phpdotenv 5.6.1 Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically. voku/portable-ascii 2.0.1 Portable ASCII library - performance optimized (ascii) string functions for php. voku/portable-utf8 6.0.13 Portable UTF-8 library - performance optimized (unicode) string functions for php. wamania/php-stemmer 3.0.1 Native PHP Stemmer webmozart/assert 1.11.0 Assertions to validate method input/output with nice error messages. yiisoft/error-handler 3.3.0 Yii Error Handling Library yiisoft/friendly-exception 1.1.0 An interface for friendlier exception yiisoft/http 1.2.0 Constants and PSR-7 PhpStorm meta for HTTP protocol headers, methods and statuses yiisoft/injector 1.2.0 PSR-11 compatible injector. Executes a callable and makes an instances by injecting dependencies f... yiisoft/strings 2.4.0 Yii Strings Helper ```
alexander-schranz commented 2 months ago

Closing as fixed by @roxblnfk (thx πŸ™ ). For others check out https://github.com/schranz-search/schranz-search/pull/418

roxblnfk commented 2 months ago

Fixed for other projects in https://github.com/spiral/testing/pull/74 Available with https://github.com/spiral/testing/releases/tag/2.8.1