├── frameworks ├── cake │ ├── plugins │ │ └── .gitkeep │ ├── resources │ │ └── .gitkeep │ ├── src │ │ ├── View │ │ │ ├── Cell │ │ │ │ └── .gitkeep │ │ │ ├── Helper │ │ │ │ └── .gitkeep │ │ │ ├── AppView.php │ │ │ └── AjaxView.php │ │ ├── Model │ │ │ ├── Behavior │ │ │ │ └── .gitkeep │ │ │ ├── Entity │ │ │ │ └── .gitkeep │ │ │ └── Table │ │ │ │ └── .gitkeep │ │ └── Controller │ │ │ ├── Component │ │ │ └── .gitkeep │ │ │ ├── AppController.php │ │ │ └── ErrorController.php │ ├── tests │ │ ├── Fixture │ │ │ └── .gitkeep │ │ ├── TestCase │ │ │ ├── View │ │ │ │ └── Helper │ │ │ │ │ └── .gitkeep │ │ │ ├── Model │ │ │ │ └── Behavior │ │ │ │ │ └── .gitkeep │ │ │ └── Controller │ │ │ │ └── Component │ │ │ │ └── .gitkeep │ │ └── bootstrap.php │ ├── webroot │ │ ├── js │ │ │ └── .gitkeep │ │ ├── favicon.ico │ │ ├── img │ │ │ ├── cake-logo.png │ │ │ ├── cake.icon.png │ │ │ └── cake.power.gif │ │ ├── .htaccess │ │ ├── font │ │ │ ├── cakedingbats-webfont.eot │ │ │ ├── cakedingbats-webfont.ttf │ │ │ ├── cakedingbats-webfont.woff │ │ │ └── cakedingbats-webfont.woff2 │ │ ├── index.php │ │ └── css │ │ │ ├── home.css │ │ │ └── normalize.min.css │ ├── templates │ │ ├── cell │ │ │ └── .gitkeep │ │ ├── element │ │ │ └── flash │ │ │ │ ├── error.php │ │ │ │ ├── success.php │ │ │ │ └── default.php │ │ ├── email │ │ │ ├── text │ │ │ │ └── default.php │ │ │ └── html │ │ │ │ └── default.php │ │ ├── layout │ │ │ ├── ajax.php │ │ │ ├── email │ │ │ │ ├── text │ │ │ │ │ └── default.php │ │ │ │ └── html │ │ │ │ │ └── default.php │ │ │ ├── error.php │ │ │ └── default.php │ │ └── Error │ │ │ ├── error400.php │ │ │ └── error500.php │ ├── phpcs.xml │ ├── phpstan.neon │ ├── .htaccess │ ├── bin │ │ ├── cake.php │ │ └── cake.bat │ ├── .editorconfig │ ├── index.php │ ├── config │ │ ├── schema │ │ │ ├── i18n.sql │ │ │ └── sessions.sql │ │ ├── bootstrap_cli.php │ │ ├── requirements.php │ │ └── .env.example │ ├── .gitignore │ ├── .gitattributes │ ├── .github │ │ ├── workflows │ │ │ ├── stale.yml │ │ │ └── ci.yml │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ └── ISSUE_TEMPLATE.md │ ├── phpunit.xml.dist │ ├── README.md │ └── composer.json ├── laminas │ ├── data │ │ └── cache │ │ │ └── .gitkeep │ ├── config │ │ ├── autoload │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── global.php │ │ │ ├── local.php.dist │ │ │ └── development.local.php.dist │ │ ├── modules.config.php │ │ └── development.config.php.dist │ ├── COPYRIGHT.md │ ├── .gitattributes │ ├── docker-compose.yml │ ├── public │ │ ├── img │ │ │ └── favicon.ico │ │ ├── css │ │ │ └── style.css │ │ ├── .htaccess │ │ ├── web.config │ │ └── index.php │ ├── .gitignore │ ├── module │ │ └── Application │ │ │ ├── src │ │ │ ├── Module.php │ │ │ └── Controller │ │ │ │ └── IndexController.php │ │ │ ├── test │ │ │ └── Controller │ │ │ │ └── IndexControllerTest.php │ │ │ ├── config │ │ │ └── module.config.php │ │ │ └── view │ │ │ └── error │ │ │ └── index.phtml │ ├── phpunit.xml.dist │ ├── phpcs.xml │ ├── psalm.xml │ ├── LICENSE.md │ ├── Vagrantfile │ ├── composer.json │ └── Dockerfile ├── laravel │ ├── public │ │ ├── favicon.ico │ │ ├── robots.txt │ │ ├── .htaccess │ │ ├── web.config │ │ └── index.php │ ├── resources │ │ ├── css │ │ │ └── app.css │ │ ├── js │ │ │ ├── app.js │ │ │ └── bootstrap.js │ │ └── lang │ │ │ └── en │ │ │ ├── pagination.php │ │ │ ├── auth.php │ │ │ └── passwords.php │ ├── database │ │ ├── .gitignore │ │ ├── seeders │ │ │ └── DatabaseSeeder.php │ │ ├── migrations │ │ │ ├── 2014_10_12_100000_create_password_resets_table.php │ │ │ ├── 2014_10_12_000000_create_users_table.php │ │ │ └── 2019_08_19_000000_create_failed_jobs_table.php │ │ └── factories │ │ │ └── UserFactory.php │ ├── bootstrap │ │ ├── cache │ │ │ └── .gitignore │ │ └── app.php │ ├── storage │ │ ├── logs │ │ │ └── .gitignore │ │ ├── app │ │ │ ├── public │ │ │ │ └── .gitignore │ │ │ └── .gitignore │ │ └── framework │ │ │ ├── sessions │ │ │ └── .gitignore │ │ │ ├── testing │ │ │ └── .gitignore │ │ │ ├── views │ │ │ └── .gitignore │ │ │ ├── cache │ │ │ ├── data │ │ │ │ └── .gitignore │ │ │ └── .gitignore │ │ │ └── .gitignore │ ├── .gitattributes │ ├── tests │ │ ├── TestCase.php │ │ ├── Unit │ │ │ └── ExampleTest.php │ │ ├── Feature │ │ │ └── ExampleTest.php │ │ └── CreatesApplication.php │ ├── .styleci.yml │ ├── .gitignore │ ├── .editorconfig │ ├── app │ │ ├── Http │ │ │ ├── Middleware │ │ │ │ ├── EncryptCookies.php │ │ │ │ ├── VerifyCsrfToken.php │ │ │ │ ├── TrustHosts.php │ │ │ │ ├── PreventRequestsDuringMaintenance.php │ │ │ │ ├── TrimStrings.php │ │ │ │ ├── Authenticate.php │ │ │ │ ├── TrustProxies.php │ │ │ │ └── RedirectIfAuthenticated.php │ │ │ └── Controllers │ │ │ │ └── Controller.php │ │ ├── Providers │ │ │ ├── BroadcastServiceProvider.php │ │ │ ├── AppServiceProvider.php │ │ │ ├── AuthServiceProvider.php │ │ │ ├── EventServiceProvider.php │ │ │ └── RouteServiceProvider.php │ │ ├── Exceptions │ │ │ └── Handler.php │ │ ├── Console │ │ │ └── Kernel.php │ │ └── Models │ │ │ └── User.php │ ├── package.json │ ├── routes │ │ ├── web.php │ │ ├── channels.php │ │ ├── api.php │ │ └── console.php │ ├── webpack.mix.js │ ├── server.php │ ├── config │ │ ├── cors.php │ │ ├── services.php │ │ ├── view.php │ │ ├── hashing.php │ │ └── broadcasting.php │ ├── .env.example │ ├── phpunit.xml │ ├── composer.json │ └── artisan ├── symfony │ ├── src │ │ ├── Controller │ │ │ └── .gitignore │ │ └── Kernel.php │ ├── config │ │ ├── routes.yaml │ │ ├── bundles.php │ │ ├── routes │ │ │ └── framework.yaml │ │ ├── preload.php │ │ ├── packages │ │ │ ├── routing.yaml │ │ │ ├── cache.yaml │ │ │ └── framework.yaml │ │ └── services.yaml │ ├── .gitignore │ ├── public │ │ └── index.php │ ├── bin │ │ └── console │ ├── .env │ └── composer.json └── spiral │ ├── .gitignore │ ├── public │ ├── favicon.ico │ ├── images │ │ └── logo.svg │ └── styles │ │ └── welcome.css │ ├── .env.sample │ ├── app │ ├── views │ │ ├── embed │ │ │ └── links.dark.php │ │ ├── layout │ │ │ └── base.dark.php │ │ └── home.dark.php │ ├── locale │ │ └── ru │ │ │ └── messages.en.php │ ├── src │ │ ├── Job │ │ │ └── Ping.php │ │ ├── Bootloader │ │ │ ├── LocaleSelectorBootloader.php │ │ │ ├── LoggingBootloader.php │ │ │ └── RoutesBootloader.php │ │ └── Controller │ │ │ └── HomeController.php │ └── config │ │ └── database.php │ ├── .editorconfig │ ├── .styleci.yml │ ├── tests │ ├── Unit │ │ └── DemoTest.php │ ├── TestApp.php │ ├── Feature │ │ └── BasicTest.php │ ├── Traits │ │ └── InteractsWithConsole.php │ └── TestCase.php │ ├── .rr.yaml │ ├── app.php │ ├── LICENSE │ ├── phpunit.xml │ └── composer.json ├── src └── event │ ├── .gitignore │ ├── tests │ ├── bootstrap.php │ ├── Domain │ │ ├── Repository │ │ │ └── InMemoryEventRepositoryTest.php │ │ ├── Exception │ │ │ ├── EventNotFoundExceptionTest.php │ │ │ └── EventTranslationNotFoundExceptionTest.php │ │ └── Model │ │ │ └── EventTransaltionTest.php │ ├── Application │ │ ├── Message │ │ │ ├── RemoveEventMessageTest.php │ │ │ ├── CreateEventMessageTest.php │ │ │ └── ModifyEventMessageTest.php │ │ └── MessageHandler │ │ │ ├── CreateEventMessageHandlerTest.php │ │ │ └── RemoveEventMessageHandlerTest.php │ └── TestTraits │ │ └── PrivatePropertyTrait.php │ ├── src │ ├── Domain │ │ ├── Model │ │ │ ├── EventTranslationInterface.php │ │ │ ├── EventTranslation.php │ │ │ └── EventInterface.php │ │ ├── Exception │ │ │ ├── EventNotFoundException.php │ │ │ └── EventTranslationNotFoundException.php │ │ └── Repository │ │ │ └── EventRepositoryInterface.php │ ├── Application │ │ ├── Message │ │ │ ├── RemoveEventMessage.php │ │ │ ├── CreateEventMessage.php │ │ │ └── ModifyEventMessage.php │ │ ├── Datamapper │ │ │ ├── EventDataMapper.php │ │ │ └── EventDataMapperInterface.php │ │ └── MessageHandler │ │ │ ├── RemoveEventMessageHandler.php │ │ │ ├── CreateEventMessageHandler.php │ │ │ └── ModifyEventMessageHandler.php │ └── Infrastructure │ │ └── ORM │ │ ├── Cycle │ │ └── composer.json │ │ └── Doctrine │ │ ├── composer.json │ │ └── config │ │ ├── Event.orm.xml │ │ └── EventTranslation.orm.xml │ ├── depfile.yaml │ ├── phpunit.xml.dist │ ├── composer.json │ └── .php-cs-fixer.dist.php └── LICENSE /frameworks/cake/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/resources/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/src/View/Cell/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/tests/Fixture/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/webroot/js/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/laminas/data/cache/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/laravel/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/src/Model/Behavior/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/src/Model/Entity/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/src/Model/Table/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/src/View/Helper/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/laravel/resources/css/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/templates/cell/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /frameworks/symfony/src/Controller/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/src/Controller/Component/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/tests/TestCase/View/Helper/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/laravel/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /frameworks/cake/tests/TestCase/Model/Behavior/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/cake/tests/TestCase/Controller/Component/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frameworks/laravel/bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /frameworks/laravel/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /frameworks/laravel/resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('./bootstrap'); 2 | -------------------------------------------------------------------------------- /frameworks/laravel/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /frameworks/laravel/storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /frameworks/laminas/config/autoload/.gitignore: -------------------------------------------------------------------------------- 1 | local.php 2 | *.local.php 3 | -------------------------------------------------------------------------------- /frameworks/laravel/storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /frameworks/laravel/storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /frameworks/laravel/storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /frameworks/laravel/storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /frameworks/laravel/storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /frameworks/laravel/storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /frameworks/laminas/COPYRIGHT.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. (https://getlaminas.org/) 2 | -------------------------------------------------------------------------------- /frameworks/symfony/config/routes.yaml: -------------------------------------------------------------------------------- 1 | #index: 2 | # path: / 3 | # controller: App\Controller\DefaultController::index 4 | -------------------------------------------------------------------------------- /frameworks/laminas/.gitattributes: -------------------------------------------------------------------------------- 1 | /.github/ export-ignore 2 | /bin/remove-package-artifacts.php export-ignore 3 | /CHANGELOG.md 4 | -------------------------------------------------------------------------------- /frameworks/spiral/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | vendor 3 | runtime 4 | rr* 5 | spiral* 6 | .env 7 | .phpunit.result.cache 8 | composer.lock 9 | -------------------------------------------------------------------------------- /src/event/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | 3 | .deptrac.cache 4 | .php-cs-fixer.cache 5 | .phpunit.result.cache 6 | 7 | tests/reports 8 | tests/var 9 | -------------------------------------------------------------------------------- /frameworks/cake/webroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/cake/webroot/favicon.ico -------------------------------------------------------------------------------- /frameworks/spiral/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/spiral/public/favicon.ico -------------------------------------------------------------------------------- /frameworks/symfony/config/bundles.php: -------------------------------------------------------------------------------- 1 | ['all' => true], 5 | ]; 6 | -------------------------------------------------------------------------------- /frameworks/laminas/docker-compose.yml: -------------------------------------------------------------------------------- 1 | laminas: 2 | build: . 3 | dockerfile: Dockerfile 4 | ports: 5 | - "8080:80" 6 | volumes: 7 | - .:/var/www 8 | -------------------------------------------------------------------------------- /frameworks/cake/webroot/img/cake-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/cake/webroot/img/cake-logo.png -------------------------------------------------------------------------------- /frameworks/cake/webroot/img/cake.icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/cake/webroot/img/cake.icon.png -------------------------------------------------------------------------------- /frameworks/cake/webroot/img/cake.power.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/cake/webroot/img/cake.power.gif -------------------------------------------------------------------------------- /frameworks/laminas/public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/laminas/public/img/favicon.ico -------------------------------------------------------------------------------- /frameworks/laravel/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /frameworks/laminas/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant/ 2 | vendor/ 3 | config/development.config.php 4 | data/cache/* 5 | !data/cache/.gitkeep 6 | phpunit.xml 7 | .phpunit.result.cache 8 | -------------------------------------------------------------------------------- /frameworks/cake/webroot/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteCond %{REQUEST_FILENAME} !-f 4 | RewriteRule ^ index.php [L] 5 | 6 | -------------------------------------------------------------------------------- /frameworks/symfony/config/routes/framework.yaml: -------------------------------------------------------------------------------- 1 | when@dev: 2 | _errors: 3 | resource: '@FrameworkBundle/Resources/config/routing/errors.xml' 4 | prefix: /_error 5 | -------------------------------------------------------------------------------- /frameworks/cake/webroot/font/cakedingbats-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/cake/webroot/font/cakedingbats-webfont.eot -------------------------------------------------------------------------------- /frameworks/cake/webroot/font/cakedingbats-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/cake/webroot/font/cakedingbats-webfont.ttf -------------------------------------------------------------------------------- /frameworks/cake/webroot/font/cakedingbats-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/cake/webroot/font/cakedingbats-webfont.woff -------------------------------------------------------------------------------- /frameworks/cake/webroot/font/cakedingbats-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexander-schranz/hexagonal-architecture-study/HEAD/frameworks/cake/webroot/font/cakedingbats-webfont.woff2 -------------------------------------------------------------------------------- /frameworks/cake/phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /frameworks/laravel/storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /frameworks/symfony/config/preload.php: -------------------------------------------------------------------------------- 1 | symfony/framework-bundle ### 3 | /.env.local 4 | /.env.local.php 5 | /.env.*.local 6 | /config/secrets/prod/prod.decrypt.private.php 7 | /public/bundles/ 8 | /var/ 9 | /vendor/ 10 | ###< symfony/framework-bundle ### 11 | -------------------------------------------------------------------------------- /frameworks/laravel/.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - no_unused_imports 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /frameworks/symfony/public/index.php: -------------------------------------------------------------------------------- 1 | 11 |
12 | -------------------------------------------------------------------------------- /frameworks/laminas/module/Application/src/Module.php: -------------------------------------------------------------------------------- 1 | [[GitHub]] 2 | | [[Exception]] 3 | | [[Create Queue Task]] 4 | | [[Application Metrics]] 5 | | [[Website and Documentation]] -------------------------------------------------------------------------------- /frameworks/cake/templates/element/flash/success.php: -------------------------------------------------------------------------------- 1 | 11 |
12 | -------------------------------------------------------------------------------- /frameworks/spiral/app/views/layout/base.dark.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ${title} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | ${context} 14 | -------------------------------------------------------------------------------- /frameworks/laravel/tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/event/src/Domain/Model/EventTranslationInterface.php: -------------------------------------------------------------------------------- 1 | create(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /frameworks/cake/.htaccess: -------------------------------------------------------------------------------- 1 | # Uncomment the following to prevent the httpoxy vulnerability 2 | # See: https://httpoxy.org/ 3 | # 4 | # RequestHeader unset Proxy 5 | # 6 | 7 | 8 | RewriteEngine on 9 | RewriteRule ^(\.well-known/.*)$ $1 [L] 10 | RewriteRule ^$ webroot/ [L] 11 | RewriteRule (.*) webroot/$1 [L] 12 | 13 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | run($argv)); 13 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /frameworks/cake/templates/element/flash/default.php: -------------------------------------------------------------------------------- 1 | 15 |
16 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /frameworks/laminas/config/development.config.php.dist: -------------------------------------------------------------------------------- 1 | [ 6 | ], 7 | // Configuration overrides during development mode 8 | 'module_listener_options' => [ 9 | 'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}-development.php'], 10 | 'config_cache_enabled' => false, 11 | 'module_map_cache_enabled' => false, 12 | ], 13 | ]; 14 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ./module/Application/test 6 | 7 | 8 | 9 | 10 | ./module/*/src 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /frameworks/cake/.editorconfig: -------------------------------------------------------------------------------- 1 | ; This file is for unifying the coding style for different editors and IDEs. 2 | ; More information at https://editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 4 9 | end_of_line = lf 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.bat] 14 | end_of_line = crlf 15 | 16 | [*.yml] 17 | indent_size = 2 18 | 19 | [*.twig] 20 | insert_final_newline = false 21 | 22 | [Makefile] 23 | indent_style = tab 24 | -------------------------------------------------------------------------------- /frameworks/laravel/tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /frameworks/spiral/public/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frameworks/spiral/tests/Unit/DemoTest.php: -------------------------------------------------------------------------------- 1 | assertTrue($expected); 24 | $this->assertFalse($actual); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /frameworks/laminas/config/autoload/local.php.dist: -------------------------------------------------------------------------------- 1 | $identifier 13 | */ 14 | public function __construct(private array $identifier) 15 | { 16 | } 17 | 18 | /** 19 | * @return array{ 20 | * id: int, 21 | * }|array 22 | */ 23 | public function getIdentifier(): array 24 | { 25 | return $this->identifier; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /frameworks/laravel/webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel applications. By default, we are compiling the CSS 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .postCss('resources/css/app.css', 'public/css', [ 16 | // 17 | ]); 18 | -------------------------------------------------------------------------------- /frameworks/spiral/tests/TestApp.php: -------------------------------------------------------------------------------- 1 | container->get($alias, $context); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /frameworks/laravel/resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /frameworks/laravel/routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /src/event/tests/Domain/Repository/InMemoryEventRepositoryTest.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /frameworks/laravel/server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /frameworks/laminas/config/autoload/development.local.php.dist: -------------------------------------------------------------------------------- 1 | 10 | * $ composer development-enable 11 | * 12 | * 13 | * from the project root to copy this file to development.local.php and enable 14 | * the settings it contains. 15 | * 16 | * You may also create files matching the glob pattern `{,*.}{global,local}-development.php`. 17 | */ 18 | 19 | return [ 20 | 'view_manager' => [ 21 | 'display_exceptions' => true, 22 | ], 23 | ]; 24 | -------------------------------------------------------------------------------- /frameworks/spiral/app/locale/ru/messages.en.php: -------------------------------------------------------------------------------- 1 | 'GitHub', 7 | 'Exception' => 'Страница ошибки', 8 | 'Create Queue Task' => 'Создать фоновую задачу', 9 | 'Application Metrics' => 'Prometheus метрики', 10 | 'Website and Documentation' => 'Документация', 11 | 'Welcome To Spiral' => 'Добро пожаловать', 12 | 'Welcome to Spiral Framework' => 'Вас приветствует Spiral Framework', 13 | 'This view file is located in' => 'Данный шаблон находится в файле', 14 | 'and rendered by' => 'и вызван контроллером', 15 | ]; 16 | -------------------------------------------------------------------------------- /frameworks/laravel/routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /frameworks/laravel/public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /frameworks/cake/index.php: -------------------------------------------------------------------------------- 1 | push(PingJob::class, ["value"=>"my value"]); 18 | */ 19 | class Ping extends JobHandler 20 | { 21 | /** 22 | * @param string $id 23 | * @param string $value 24 | */ 25 | public function invoke(string $id, string $value): void 26 | { 27 | // do something 28 | error_log("pong by {$id}, value `{$value}`"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /frameworks/cake/templates/layout/ajax.php: -------------------------------------------------------------------------------- 1 | fetch('content'); 18 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /frameworks/cake/config/schema/i18n.sql: -------------------------------------------------------------------------------- 1 | # Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) 2 | # 3 | # Licensed under The MIT License 4 | # For full copyright and license information, please see the LICENSE.txt 5 | # Redistributions of files must retain the above copyright notice. 6 | # MIT License (https://opensource.org/licenses/mit-license.php) 7 | 8 | CREATE TABLE i18n ( 9 | id int NOT NULL auto_increment, 10 | locale varchar(6) NOT NULL, 11 | model varchar(255) NOT NULL, 12 | foreign_key int(10) NOT NULL, 13 | field varchar(255) NOT NULL, 14 | content text, 15 | PRIMARY KEY (id), 16 | UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field), 17 | INDEX I18N_FIELD(model, foreign_key, field) 18 | ); 19 | -------------------------------------------------------------------------------- /frameworks/cake/templates/layout/email/text/default.php: -------------------------------------------------------------------------------- 1 | fetch('content'); 18 | -------------------------------------------------------------------------------- /src/event/src/Application/Datamapper/EventDataMapper.php: -------------------------------------------------------------------------------- 1 | setTitle($data['title']); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /frameworks/laravel/resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /frameworks/symfony/config/packages/cache.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | cache: 3 | # Unique name of your app: used to compute stable namespaces for cache keys. 4 | #prefix_seed: your_vendor_name/app_name 5 | 6 | # The "app" cache stores to the filesystem by default. 7 | # The data in this cache should persist between deploys. 8 | # Other options include: 9 | 10 | # Redis 11 | #app: cache.adapter.redis 12 | #default_redis_provider: redis://localhost 13 | 14 | # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) 15 | #app: cache.adapter.apcu 16 | 17 | # Namespaced pools use the above "app" backend by default 18 | #pools: 19 | #my.dedicated.cache: null 20 | -------------------------------------------------------------------------------- /src/event/depfile.yaml: -------------------------------------------------------------------------------- 1 | paths: 2 | - src 3 | 4 | layers: 5 | - name: UserInterface 6 | collectors: 7 | - type: directory 8 | regex: UserInterface/.* 9 | - name: Infrastructure 10 | collectors: 11 | - type: directory 12 | regex: Infrastructure/.* 13 | - name: Application 14 | collectors: 15 | - type: directory 16 | regex: Application/.* 17 | - name: Domain 18 | collectors: 19 | - type: directory 20 | regex: Domain/.* 21 | 22 | ruleset: 23 | UserInterface: 24 | - Application 25 | - Domain 26 | - Infrastructure 27 | Infrastructure: 28 | - Application 29 | - Domain 30 | Application: 31 | - Domain 32 | Domain: ~ 33 | -------------------------------------------------------------------------------- /frameworks/spiral/app/src/Bootloader/LocaleSelectorBootloader.php: -------------------------------------------------------------------------------- 1 | addMiddleware(LocaleSelector::class); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /frameworks/cake/.gitignore: -------------------------------------------------------------------------------- 1 | # CakePHP specific files # 2 | ########################## 3 | /config/app_local.php 4 | /config/.env 5 | /logs/* 6 | /tmp/* 7 | /vendor/* 8 | 9 | # OS generated files # 10 | ###################### 11 | .DS_Store 12 | .DS_Store? 13 | ._* 14 | .Spotlight-V100 15 | .Trashes 16 | Icon? 17 | ehthumbs.db 18 | Thumbs.db 19 | .directory 20 | 21 | # Tool specific files # 22 | ####################### 23 | # PHPUnit 24 | .phpunit.result.cache 25 | # vim 26 | *~ 27 | *.swp 28 | *.swo 29 | # sublime text & textmate 30 | *.sublime-* 31 | *.stTheme.cache 32 | *.tmlanguage.cache 33 | *.tmPreferences.cache 34 | # Eclipse 35 | .settings/* 36 | # JetBrains, aka PHPStorm, IntelliJ IDEA 37 | .idea/* 38 | # NetBeans 39 | nbproject/* 40 | # Visual Studio Code 41 | .vscode 42 | # Sass preprocessor 43 | .sass-cache/ 44 | -------------------------------------------------------------------------------- /src/event/src/Application/Datamapper/EventDataMapperInterface.php: -------------------------------------------------------------------------------- 1 | createMessage(['id' => 2]); 15 | $this->assertSame(['id' => 2], $message->getIdentifier()); 16 | } 17 | 18 | /** 19 | * @param mixed[] $data 20 | */ 21 | protected function createMessage(array $data = []): RemoveEventMessage 22 | { 23 | return new RemoveEventMessage([ 24 | 'id' => $data['id'] ?? 1, 25 | ]); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /frameworks/laminas/public/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | 3 | # The following rule tells Apache that if the requested filename 4 | # exists, simply serve it. 5 | RewriteCond %{REQUEST_FILENAME} -s [OR] 6 | RewriteCond %{REQUEST_FILENAME} -l [OR] 7 | RewriteCond %{REQUEST_FILENAME} -d 8 | RewriteRule ^.*$ - [L] 9 | 10 | # The following rewrites all other queries to index.php. The 11 | # condition ensures that if you are using Apache aliases to do 12 | # mass virtual hosting or installed the project in a subdirectory, 13 | # the base path will be prepended to allow proper resolution of 14 | # the index.php file; it will work in non-aliased environments 15 | # as well, providing a safe, one-size fits all solution. 16 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ 17 | RewriteRule ^(.*) - [E=BASE:%1] 18 | RewriteRule ^(.*)$ %{ENV:BASE}/index.php [L] 19 | -------------------------------------------------------------------------------- /src/event/src/Infrastructure/ORM/Doctrine/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "framework-compatibility-project/event-doctrine-bridge", 3 | "description": "Doctrine infrastructure integration for events.", 4 | "type": "library", 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "Alexander Schranz", 9 | "email": "alexander@sulu.io" 10 | } 11 | ], 12 | "require": { 13 | "php": "^8.0", 14 | "doctrine/collections": "^1.6", 15 | "doctrine/orm": "^2.9", 16 | "framework-compatibility-project/event": "^1.0" 17 | }, 18 | "autoload": { 19 | "psr-4": { 20 | "FrameworkCompatibilityProject\\Event\\Infrastructure\\ORM\\Doctrine\\": "./" 21 | } 22 | }, 23 | "require-dev": { 24 | "symfony/cache": "^5.3" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /frameworks/symfony/config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | # see https://symfony.com/doc/current/reference/configuration/framework.html 2 | framework: 3 | secret: '%env(APP_SECRET)%' 4 | #csrf_protection: true 5 | http_method_override: false 6 | 7 | # Enables session support. Note that the session will ONLY be started if you read or write from it. 8 | # Remove or comment this section to explicitly disable session support. 9 | session: 10 | handler_id: null 11 | cookie_secure: auto 12 | cookie_samesite: lax 13 | storage_factory_id: session.storage.factory.native 14 | 15 | #esi: true 16 | #fragments: true 17 | php_errors: 18 | log: true 19 | 20 | when@test: 21 | framework: 22 | test: true 23 | session: 24 | storage_factory_id: session.storage.factory.mock_file 25 | -------------------------------------------------------------------------------- /frameworks/cake/config/schema/sessions.sql: -------------------------------------------------------------------------------- 1 | # Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) 2 | # 3 | # Licensed under The MIT License 4 | # For full copyright and license information, please see the LICENSE.txt 5 | # Redistributions of files must retain the above copyright notice. 6 | # MIT License (https://opensource.org/licenses/mit-license.php) 7 | 8 | CREATE TABLE `sessions` ( 9 | `id` char(40) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, 10 | `created` datetime DEFAULT CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+ 11 | `modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- optional, requires MySQL 5.6.5+ 12 | `data` blob DEFAULT NULL, -- for PostgreSQL use bytea instead of blob 13 | `expires` int(10) unsigned DEFAULT NULL, 14 | PRIMARY KEY (`id`) 15 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 16 | -------------------------------------------------------------------------------- /frameworks/cake/templates/email/html/default.php: -------------------------------------------------------------------------------- 1 | ' . $line . "

\n"; 21 | endforeach; 22 | -------------------------------------------------------------------------------- /frameworks/cake/.gitattributes: -------------------------------------------------------------------------------- 1 | # Define the line ending behavior of the different file extensions 2 | # Set default behavior, in case users don't have core.autocrlf set. 3 | * text text=auto eol=lf 4 | 5 | # Declare files that will always have CRLF line endings on checkout. 6 | *.bat eol=crlf 7 | 8 | # Declare files that will always have LF line endings on checkout. 9 | *.pem eol=lf 10 | 11 | # Denote all files that are truly binary and should not be modified. 12 | *.png binary 13 | *.jpg binary 14 | *.jpeg binary 15 | *.gif binary 16 | *.webp binary 17 | *.ico binary 18 | *.mo binary 19 | *.pdf binary 20 | *.xls binary 21 | *.xlsx binary 22 | *.phar binary 23 | *.woff binary 24 | *.woff2 binary 25 | *.ttf binary 26 | *.otf binary 27 | *.eot binary 28 | *.gz binary 29 | *.bz2 binary 30 | *.7z binary 31 | *.zip binary 32 | *.webm binary 33 | *.mp4 binary 34 | *.ogv binary 35 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/event/tests/Domain/Exception/EventNotFoundExceptionTest.php: -------------------------------------------------------------------------------- 1 | 1, 16 | 'object' => new \stdClass(), 17 | 'array' => [ 18 | 'more' => 'test', 19 | ], 20 | ]); 21 | 22 | $this->assertSame( 23 | 'The even with "id" 1 and "object" stdClass and "array" {"more":"test"} not found.', 24 | $exception->getMessage() 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /frameworks/laravel/resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /frameworks/spiral/app/views/home.dark.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Framework Logotype 12 |

[[Welcome to Spiral Framework]]

13 | 14 | 15 | 16 |
17 | [[This view file is located in]] app/views/home.dark.php [[and rendered by]] Controller\HomeController. 18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /frameworks/laravel/database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/event/src/Application/Message/CreateEventMessage.php: -------------------------------------------------------------------------------- 1 | $data 14 | */ 15 | public function __construct(private array $data) 16 | { 17 | } 18 | 19 | public function getLocale(): string 20 | { 21 | return $this->data['locale']; 22 | } 23 | 24 | public function getTitle(): string 25 | { 26 | return $this->data['title']; 27 | } 28 | 29 | /** 30 | * @return array{ 31 | * locale: string, 32 | * title: string, 33 | * }|array 34 | */ 35 | public function getData(): array 36 | { 37 | return $this->data; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/event/src/Application/MessageHandler/RemoveEventMessageHandler.php: -------------------------------------------------------------------------------- 1 | eventRepository->getOneBy($message->getIdentifier()); 23 | 24 | $this->eventRepository->remove($event); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/event/src/Domain/Model/EventTranslation.php: -------------------------------------------------------------------------------- 1 | event->addTranslation($this); 21 | } 22 | 23 | public function getLocale(): string 24 | { 25 | return $this->locale; 26 | } 27 | 28 | public function getTitle(): string 29 | { 30 | return $this->title; 31 | } 32 | 33 | public function setTitle(string $title): static 34 | { 35 | $this->title = $title; 36 | 37 | return $this; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /frameworks/cake/.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: "0 0 * * *" 6 | 7 | jobs: 8 | stale: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/stale@v1 14 | with: 15 | repo-token: ${{ secrets.GITHUB_TOKEN }} 16 | stale-issue-message: 'This issue is stale because it has been open for 120 days with no activity. Remove the `stale` label or comment or this will be closed in 15 days' 17 | stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove the `stale` label or comment on this issue, or it will be closed in 15 days' 18 | stale-issue-label: 'stale' 19 | stale-pr-label: 'stale' 20 | days-before-stale: 120 21 | days-before-close: 15 22 | exempt-issue-label: 'pinned' 23 | exempt-pr-label: 'pinned' 24 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /frameworks/spiral/app.php: -------------------------------------------------------------------------------- 1 | __DIR__]); 34 | 35 | if ($app !== null) { 36 | $code = (int)$app->serve(); 37 | exit($code); 38 | } 39 | -------------------------------------------------------------------------------- /frameworks/cake/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /frameworks/cake/templates/layout/email/html/default.php: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | <?= $this->fetch('title') ?> 21 | 22 | 23 | fetch('content') ?> 24 | 25 | 26 | -------------------------------------------------------------------------------- /frameworks/symfony/.env: -------------------------------------------------------------------------------- 1 | # In all environments, the following files are loaded if they exist, 2 | # the latter taking precedence over the former: 3 | # 4 | # * .env contains default values for the environment variables needed by the app 5 | # * .env.local uncommitted file with local overrides 6 | # * .env.$APP_ENV committed environment-specific defaults 7 | # * .env.$APP_ENV.local uncommitted environment-specific overrides 8 | # 9 | # Real environment variables win over .env files. 10 | # 11 | # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. 12 | # 13 | # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). 14 | # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration 15 | 16 | ###> symfony/framework-bundle ### 17 | APP_ENV=dev 18 | APP_SECRET=24f7270b2e84fb712c6c230a803b5e39 19 | ###< symfony/framework-bundle ### 20 | -------------------------------------------------------------------------------- /frameworks/cake/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | This is a (multiple allowed): 2 | 3 | * [x] bug 4 | * [ ] enhancement 5 | * [ ] feature-discussion (RFC) 6 | 7 | * CakePHP Application Skeleton Version: EXACT RELEASE VERSION OR COMMIT HASH, HERE. 8 | * Platform and Target: YOUR WEB-SERVER, DATABASE AND OTHER RELEVANT INFO AND HOW THE REQUEST IS BEING MADE, HERE. 9 | 10 | ### What you did 11 | EXPLAIN WHAT YOU DID, PREFERABLY WITH CODE EXAMPLES, HERE. 12 | 13 | ### What happened 14 | EXPLAIN WHAT IS ACTUALLY HAPPENING, HERE. 15 | 16 | ### What you expected to happen 17 | EXPLAIN WHAT IS TO BE EXPECTED, HERE. 18 | 19 | P.S. Remember, an issue is not the place to ask questions. You can use [Stack Overflow](https://stackoverflow.com/questions/tagged/cakephp) 20 | for that or join the #cakephp channel on irc.freenode.net, where we will be more 21 | than happy to help answer your questions. 22 | 23 | Before you open an issue, please check if a similar issue already exists or has been closed before. -------------------------------------------------------------------------------- /frameworks/cake/bin/cake.bat: -------------------------------------------------------------------------------- 1 | :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 | :: 3 | :: Cake is a Windows batch script for invoking CakePHP shell commands 4 | :: 5 | :: CakePHP(tm) : Rapid Development Framework (https://cakephp.org) 6 | :: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) 7 | :: 8 | :: Licensed under The MIT License 9 | :: Redistributions of files must retain the above copyright notice. 10 | :: 11 | :: @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) 12 | :: @link https://cakephp.org CakePHP(tm) Project 13 | :: @since 2.0.0 14 | :: @license https://opensource.org/licenses/mit-license.php MIT License 15 | :: 16 | :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 17 | 18 | @echo off 19 | 20 | SET app=%0 21 | SET lib=%~dp0 22 | 23 | php "%lib%cake.php" %* 24 | 25 | echo. 26 | 27 | exit /B %ERRORLEVEL% 28 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 38 | // 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/event/src/Domain/Model/EventInterface.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | public function getTranslations(): iterable; 21 | 22 | public function findTranslation(string $locale): ?EventTranslationInterface; 23 | 24 | /** 25 | * @throws EventTranslationNotFoundException 26 | */ 27 | public function getTranslation(string $locale): EventTranslationInterface; 28 | 29 | public function addTranslation(EventTranslationInterface $translation): static; 30 | 31 | public function removeTranslation(string $locale): static; 32 | } 33 | -------------------------------------------------------------------------------- /frameworks/laravel/config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /frameworks/laravel/database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->timestamp('email_verified_at')->nullable(); 21 | $table->string('password'); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('users'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /frameworks/laravel/resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load the axios HTTP library which allows us to easily issue requests 5 | * to our Laravel back-end. This library automatically handles sending the 6 | * CSRF token as a header based on the value of the "XSRF" token cookie. 7 | */ 8 | 9 | window.axios = require('axios'); 10 | 11 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 12 | 13 | /** 14 | * Echo exposes an expressive API for subscribing to channels and listening 15 | * for events that are broadcast by Laravel. Echo and event broadcasting 16 | * allows your team to easily build robust real-time web applications. 17 | */ 18 | 19 | // import Echo from 'laravel-echo'; 20 | 21 | // window.Pusher = require('pusher-js'); 22 | 23 | // window.Echo = new Echo({ 24 | // broadcaster: 'pusher', 25 | // key: process.env.MIX_PUSHER_APP_KEY, 26 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 27 | // forceTLS: true 28 | // }); 29 | -------------------------------------------------------------------------------- /src/event/src/Infrastructure/ORM/Doctrine/config/Event.orm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/event/src/Domain/Exception/EventNotFoundException.php: -------------------------------------------------------------------------------- 1 | $value) { 16 | if (\is_object($value)) { 17 | $value = get_debug_type($value); 18 | } else { 19 | $value = json_encode($value); 20 | } 21 | 22 | $filterText[] = sprintf('"%s" %s', $key, $value); 23 | } 24 | 25 | $message = sprintf( 26 | 'The even with %s not found.', 27 | implode(' and ', $filterText) 28 | ); 29 | 30 | parent::__construct( 31 | $message, 32 | $code, 33 | $previous 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Models/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 42 | ]; 43 | } 44 | -------------------------------------------------------------------------------- /frameworks/laravel/database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('uuid')->unique(); 19 | $table->text('connection'); 20 | $table->text('queue'); 21 | $table->longText('payload'); 22 | $table->longText('exception'); 23 | $table->timestamp('failed_at')->useCurrent(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('failed_jobs'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/event/tests/TestTraits/PrivatePropertyTrait.php: -------------------------------------------------------------------------------- 1 | getProperty($propertyName); 16 | $propertyReflection->setAccessible(true); 17 | 18 | return $propertyReflection->getValue($object); 19 | } 20 | 21 | /** 22 | * @param mixed $value 23 | */ 24 | protected static function setPrivateProperty(object $object, string $propertyName, $value): void 25 | { 26 | $reflection = new \ReflectionClass($object); 27 | $propertyReflection = $reflection->getProperty($propertyName); 28 | $propertyReflection->setAccessible(true); 29 | 30 | $propertyReflection->setValue($object, $value); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /frameworks/spiral/tests/Feature/BasicTest.php: -------------------------------------------------------------------------------- 1 | get('/')->getBody(); 22 | 23 | $this->assertStringContainsString($want, $got); 24 | } 25 | 26 | public function testDefaultActionWithRuLocale(): void 27 | { 28 | $want = 'Вас приветствует Spiral Framework'; 29 | $got = (string)$this->get('/', [], [ 'accept-language' => 'ru'])->getBody(); 30 | 31 | $this->assertStringContainsString($want, $got); 32 | } 33 | 34 | public function testInteractWithConsole(): void 35 | { 36 | $output = $this->runCommand('views:reset'); 37 | 38 | $this->assertStringContainsString('cache', $output); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /frameworks/laravel/.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | LOG_LEVEL=debug 9 | 10 | DB_CONNECTION=mysql 11 | DB_HOST=127.0.0.1 12 | DB_PORT=3306 13 | DB_DATABASE=laravel 14 | DB_USERNAME=root 15 | DB_PASSWORD= 16 | 17 | BROADCAST_DRIVER=log 18 | CACHE_DRIVER=file 19 | FILESYSTEM_DRIVER=local 20 | QUEUE_CONNECTION=sync 21 | SESSION_DRIVER=file 22 | SESSION_LIFETIME=120 23 | 24 | MEMCACHED_HOST=127.0.0.1 25 | 26 | REDIS_HOST=127.0.0.1 27 | REDIS_PASSWORD=null 28 | REDIS_PORT=6379 29 | 30 | MAIL_MAILER=smtp 31 | MAIL_HOST=mailhog 32 | MAIL_PORT=1025 33 | MAIL_USERNAME=null 34 | MAIL_PASSWORD=null 35 | MAIL_ENCRYPTION=null 36 | MAIL_FROM_ADDRESS=null 37 | MAIL_FROM_NAME="${APP_NAME}" 38 | 39 | AWS_ACCESS_KEY_ID= 40 | AWS_SECRET_ACCESS_KEY= 41 | AWS_DEFAULT_REGION=us-east-1 42 | AWS_BUCKET= 43 | AWS_USE_PATH_STYLE_ENDPOINT=false 44 | 45 | PUSHER_APP_ID= 46 | PUSHER_APP_KEY= 47 | PUSHER_APP_SECRET= 48 | PUSHER_APP_CLUSTER=mt1 49 | 50 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 51 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 52 | -------------------------------------------------------------------------------- /frameworks/laravel/config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Alexander Schranz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /frameworks/spiral/app/src/Controller/HomeController.php: -------------------------------------------------------------------------------- 1 | views->render('home.dark.php'); 27 | } 28 | 29 | /** 30 | * Example of exception page. 31 | * 32 | * @throws \Error 33 | */ 34 | public function exception(): void 35 | { 36 | echo $undefined; 37 | } 38 | 39 | /** 40 | * @return string 41 | */ 42 | public function ping(): string 43 | { 44 | $jobID = $this->queue->push(Ping::class, [ 45 | 'value' => 'hello world', 46 | ]); 47 | 48 | return sprintf('Job ID: %s', $jobID); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /frameworks/laminas/public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/event/src/Infrastructure/ORM/Doctrine/config/EventTranslation.orm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /frameworks/spiral/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 Spiral Scout 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /frameworks/spiral/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | tests/Unit 19 | 20 | 21 | tests/Feature 22 | 23 | 24 | 25 | 26 | 27 | app/src 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /frameworks/cake/src/View/AppView.php: -------------------------------------------------------------------------------- 1 | loadHelper('Html');` 35 | * 36 | * @return void 37 | */ 38 | public function initialize(): void 39 | { 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /frameworks/cake/templates/Error/error400.php: -------------------------------------------------------------------------------- 1 | layout = 'error'; 12 | 13 | if (Configure::read('debug')) : 14 | $this->layout = 'dev_error'; 15 | 16 | $this->assign('title', $message); 17 | $this->assign('templateName', 'error400.php'); 18 | 19 | $this->start('file'); 20 | ?> 21 | queryString)) : ?> 22 |

23 | SQL Query: 24 | queryString) ?> 25 |

26 | 27 | params)) : ?> 28 | SQL Query Params: 29 | params) ?> 30 | 31 | element('auto_table_warning') ?> 32 | end(); 35 | endif; 36 | ?> 37 |

38 |

39 | : 40 | '{$url}'") ?> 41 |

42 | -------------------------------------------------------------------------------- /frameworks/symfony/config/services.yaml: -------------------------------------------------------------------------------- 1 | # This file is the entry point to configure your own services. 2 | # Files in the packages/ subdirectory configure your dependencies. 3 | 4 | # Put parameters here that don't need to change on each machine where the app is deployed 5 | # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration 6 | parameters: 7 | 8 | services: 9 | # default configuration for services in *this* file 10 | _defaults: 11 | autowire: true # Automatically injects dependencies in your services. 12 | autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. 13 | 14 | # makes classes in src/ available to be used as services 15 | # this creates a service per class whose id is the fully-qualified class name 16 | App\: 17 | resource: '../src/' 18 | exclude: 19 | - '../src/DependencyInjection/' 20 | - '../src/Entity/' 21 | - '../src/Kernel.php' 22 | - '../src/Tests/' 23 | 24 | # add more service definitions when explicit configuration is needed 25 | # please note that last definitions always *replace* previous ones 26 | -------------------------------------------------------------------------------- /frameworks/laravel/config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /src/event/src/Domain/Exception/EventTranslationNotFoundException.php: -------------------------------------------------------------------------------- 1 | $value) { 18 | if (\is_object($value)) { 19 | $value = get_debug_type($value); 20 | } else { 21 | $value = json_encode($value); 22 | } 23 | 24 | $filterText[] = sprintf('"%s" %s', $key, $value); 25 | } 26 | 27 | $message = sprintf( 28 | 'The event translation with %s not found for event %s.', 29 | implode(' and ', $filterText), 30 | $event->__toString() 31 | ); 32 | 33 | parent::__construct( 34 | $message, 35 | $code, 36 | $previous 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/event/tests/Application/Message/CreateEventMessageTest.php: -------------------------------------------------------------------------------- 1 | createMessage(['locale' => 'sv']); 15 | $this->assertSame('sv', $message->getLocale()); 16 | } 17 | 18 | public function testGetData(): void 19 | { 20 | $message = $this->createMessage([ 21 | 'locale' => 'sv', 22 | 'title' => 'My Title', 23 | ]); 24 | $this->assertSame([ 25 | 'locale' => 'sv', 26 | 'title' => 'My Title', 27 | ], $message->getData()); 28 | } 29 | 30 | /** 31 | * @param mixed[] $data 32 | */ 33 | protected function createMessage(array $data = []): CreateEventMessage 34 | { 35 | return new CreateEventMessage([ 36 | 'locale' => $data['locale'] ?? 'en', 37 | 'title' => $data['title'] ?? 'Default Title', 38 | ]); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/event/src/Application/Message/ModifyEventMessage.php: -------------------------------------------------------------------------------- 1 | $identifier 13 | * @param array{ 14 | * locale: string, 15 | * title: string, 16 | * }|array $data 17 | */ 18 | public function __construct(private array $identifier, private array $data) 19 | { 20 | } 21 | 22 | /** 23 | * @return array{ 24 | * id: int, 25 | * }|array 26 | */ 27 | public function getIdentifier(): array 28 | { 29 | return $this->identifier; 30 | } 31 | 32 | public function getLocale(): string 33 | { 34 | return $this->data['locale']; 35 | } 36 | 37 | public function getTitle(): string 38 | { 39 | return $this->data['title']; 40 | } 41 | 42 | /** 43 | * @return array{ 44 | * locale: string, 45 | * title: string, 46 | * }|array 47 | */ 48 | public function getData(): array 49 | { 50 | return $this->data; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /frameworks/laravel/public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /frameworks/laravel/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /frameworks/cake/config/bootstrap_cli.php: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | tests/TestCase/ 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | src/ 34 | plugins/*/src/ 35 | 36 | src/Console/Installer.php 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /frameworks/cake/templates/Error/error500.php: -------------------------------------------------------------------------------- 1 | layout = 'error'; 12 | 13 | if (Configure::read('debug')) : 14 | $this->layout = 'dev_error'; 15 | 16 | $this->assign('title', $message); 17 | $this->assign('templateName', 'error500.php'); 18 | 19 | $this->start('file'); 20 | ?> 21 | queryString)) : ?> 22 |

23 | SQL Query: 24 | queryString) ?> 25 |

26 | 27 | params)) : ?> 28 | SQL Query Params: 29 | params) ?> 30 | 31 | 32 | Error in: 33 | getFile()), $error->getLine()) ?> 34 | 35 | element('auto_table_warning'); 37 | 38 | $this->end(); 39 | endif; 40 | ?> 41 |

42 |

43 | : 44 | 45 |

46 | -------------------------------------------------------------------------------- /frameworks/laravel/database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name(), 27 | 'email' => $this->faker->unique()->safeEmail(), 28 | 'email_verified_at' => now(), 29 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 30 | 'remember_token' => Str::random(10), 31 | ]; 32 | } 33 | 34 | /** 35 | * Indicate that the model's email address should be unverified. 36 | * 37 | * @return \Illuminate\Database\Eloquent\Factories\Factory 38 | */ 39 | public function unverified() 40 | { 41 | return $this->state(function (array $attributes) { 42 | return [ 43 | 'email_verified_at' => null, 44 | ]; 45 | }); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/event/src/Application/MessageHandler/CreateEventMessageHandler.php: -------------------------------------------------------------------------------- 1 | $eventDataMappers 16 | */ 17 | public function __construct( 18 | private EventRepositoryInterface $eventRepository, 19 | private iterable $eventDataMappers 20 | ) { 21 | } 22 | 23 | public function __invoke(CreateEventMessage $message): EventInterface 24 | { 25 | $event = $this->eventRepository->create($message->getLocale()); 26 | $eventTranslation = $this->eventRepository->createTranslation($event, $event->getDefaultLocale()); 27 | 28 | foreach ($this->eventDataMappers as $eventDataMapper) { 29 | $eventDataMapper->map($event, $eventTranslation, $message->getData()); 30 | } 31 | 32 | $this->eventRepository->add($event); 33 | 34 | return $event; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /frameworks/laminas/phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Laminas Coding Standard 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | public/index.php 26 | 27 | 28 | 29 | 30 | *.phtml 31 | 32 | 33 | *.phtml 34 | 35 | 36 | 37 | config 38 | module 39 | public/index.php 40 | 41 | -------------------------------------------------------------------------------- /src/event/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ./tests 19 | 20 | 21 | 22 | 23 | 24 | src/ 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /frameworks/laminas/psalm.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /frameworks/cake/templates/layout/error.php: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | Html->charset() ?> 21 | 22 | <?= $this->fetch('title') ?> 23 | 24 | Html->meta('icon') ?> 25 | 26 | 27 | 28 | Html->css(['normalize.min', 'milligram.min', 'cake']) ?> 29 | 30 | fetch('meta') ?> 31 | fetch('css') ?> 32 | fetch('script') ?> 33 | 34 | 35 |
36 | Flash->render() ?> 37 | fetch('content') ?> 38 | Html->link(__('Back'), 'javascript:history.back()') ?> 39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /frameworks/symfony/src/Kernel.php: -------------------------------------------------------------------------------- 1 | import('../config/{packages}/*.yaml'); 17 | $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); 18 | 19 | if (is_file(\dirname(__DIR__).'/config/services.yaml')) { 20 | $container->import('../config/services.yaml'); 21 | $container->import('../config/{services}_'.$this->environment.'.yaml'); 22 | } else { 23 | $container->import('../config/{services}.php'); 24 | } 25 | } 26 | 27 | protected function configureRoutes(RoutingConfigurator $routes): void 28 | { 29 | $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); 30 | $routes->import('../config/{routes}/*.yaml'); 31 | 32 | if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { 33 | $routes->import('../config/routes.yaml'); 34 | } else { 35 | $routes->import('../config/{routes}.php'); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /frameworks/spiral/app/src/Bootloader/LoggingBootloader.php: -------------------------------------------------------------------------------- 1 | addHandler(ErrorHandlerMiddleware::class, $monolog->logRotate( 31 | directory('runtime') . 'logs/http.log' 32 | )); 33 | 34 | // app level errors 35 | $monolog->addHandler(LogFactory::DEFAULT, $monolog->logRotate( 36 | directory('runtime') . 'logs/error.log', 37 | Logger::ERROR, 38 | 25, 39 | false 40 | )); 41 | 42 | // debug and info messages via global LoggerInterface 43 | $monolog->addHandler(LogFactory::DEFAULT, $monolog->logRotate( 44 | directory('runtime') . 'logs/debug.log' 45 | )); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /frameworks/spiral/app/config/database.php: -------------------------------------------------------------------------------- 1 | 'default', 17 | 18 | /** 19 | * The Spiral/Database module provides support to manage multiple databases 20 | * in one application, use read/write connections and logically separate 21 | * multiple databases within one connection using prefixes. 22 | * 23 | * To register a new database simply add a new one into 24 | * "databases" section below. 25 | */ 26 | 'databases' => [ 27 | 'default' => [ 28 | 'driver' => 'sqlite', 29 | ], 30 | ], 31 | 32 | /** 33 | * Each database instance must have an associated connection object. 34 | * Connections used to provide low-level functionality and wrap different 35 | * database drivers. To register a new connection you have to specify 36 | * the driver class and its connection options. 37 | */ 38 | 'drivers' => [ 39 | 'sqlite' => [ 40 | 'driver' => \Spiral\Database\Driver\SQLite\SQLiteDriver::class, 41 | 'connection' => 'sqlite:' . directory('root') . 'app.db', 42 | 'profiling' => true, 43 | ], 44 | ], 45 | ]; 46 | -------------------------------------------------------------------------------- /frameworks/laminas/public/index.php: -------------------------------------------------------------------------------- 1 | run(); 43 | -------------------------------------------------------------------------------- /src/event/tests/Application/Message/ModifyEventMessageTest.php: -------------------------------------------------------------------------------- 1 | createMessage(['id' => 2]); 15 | $this->assertSame(['id' => 2], $message->getIdentifier()); 16 | } 17 | 18 | public function testGetLocale(): void 19 | { 20 | $message = $this->createMessage(['locale' => 'sv']); 21 | $this->assertSame('sv', $message->getLocale()); 22 | } 23 | 24 | public function testGetData(): void 25 | { 26 | $message = $this->createMessage([ 27 | 'locale' => 'sv', 28 | 'title' => 'My Title', 29 | ]); 30 | $this->assertSame([ 31 | 'locale' => 'sv', 32 | 'title' => 'My Title', 33 | ], $message->getData()); 34 | } 35 | 36 | /** 37 | * @param mixed[] $data 38 | */ 39 | protected function createMessage(array $data = []): ModifyEventMessage 40 | { 41 | return new ModifyEventMessage([ 42 | 'id' => $data['id'] ?? 1, 43 | ], [ 44 | 'locale' => $data['locale'] ?? 'en', 45 | 'title' => $data['title'] ?? 'Default Title', 46 | ]); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /frameworks/cake/src/View/AjaxView.php: -------------------------------------------------------------------------------- 1 | response = $this->response->withType('ajax'); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /frameworks/cake/webroot/index.php: -------------------------------------------------------------------------------- 1 | emit($server->run()); 41 | -------------------------------------------------------------------------------- /frameworks/laminas/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 Laminas Project a Series of LF Projects, LLC. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | - Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | - Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | - Neither the name of Laminas Foundation nor the names of its contributors may 14 | be used to endorse or promote products derived from this software without 15 | specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 21 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 24 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /src/event/src/Application/MessageHandler/ModifyEventMessageHandler.php: -------------------------------------------------------------------------------- 1 | $eventDataMappers 17 | */ 18 | public function __construct( 19 | private EventRepositoryInterface $eventRepository, 20 | private iterable $eventDataMappers 21 | ) { 22 | } 23 | 24 | /** 25 | * @throws EventNotFoundException 26 | */ 27 | public function __invoke(ModifyEventMessage $message): EventInterface 28 | { 29 | $event = $this->eventRepository->getOneBy($message->getIdentifier()); 30 | 31 | $eventTranslation = $event->findTranslation($message->getLocale()); 32 | 33 | if (!$eventTranslation) { 34 | $eventTranslation = $this->eventRepository->createTranslation($event, $message->getLocale()); 35 | } 36 | 37 | foreach ($this->eventDataMappers as $eventDataMapper) { 38 | $eventDataMapper->map($event, $eventTranslation, $message->getData()); 39 | } 40 | 41 | return $event; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /frameworks/symfony/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "project", 3 | "license": "proprietary", 4 | "minimum-stability": "stable", 5 | "prefer-stable": true, 6 | "require": { 7 | "php": ">=7.2.5", 8 | "ext-ctype": "*", 9 | "ext-iconv": "*", 10 | "symfony/console": "5.3.*", 11 | "symfony/dotenv": "5.3.*", 12 | "symfony/flex": "^1.3.1", 13 | "symfony/framework-bundle": "5.3.*", 14 | "symfony/runtime": "5.3.*", 15 | "symfony/yaml": "5.3.*" 16 | }, 17 | "require-dev": { 18 | }, 19 | "config": { 20 | "optimize-autoloader": true, 21 | "preferred-install": { 22 | "*": "dist" 23 | }, 24 | "sort-packages": true 25 | }, 26 | "autoload": { 27 | "psr-4": { 28 | "App\\": "src/" 29 | } 30 | }, 31 | "autoload-dev": { 32 | "psr-4": { 33 | "App\\Tests\\": "tests/" 34 | } 35 | }, 36 | "replace": { 37 | "symfony/polyfill-ctype": "*", 38 | "symfony/polyfill-iconv": "*", 39 | "symfony/polyfill-php72": "*" 40 | }, 41 | "scripts": { 42 | "auto-scripts": { 43 | "cache:clear": "symfony-cmd", 44 | "assets:install %PUBLIC_DIR%": "symfony-cmd" 45 | }, 46 | "post-install-cmd": [ 47 | "@auto-scripts" 48 | ], 49 | "post-update-cmd": [ 50 | "@auto-scripts" 51 | ] 52 | }, 53 | "conflict": { 54 | "symfony/symfony": "*" 55 | }, 56 | "extra": { 57 | "symfony": { 58 | "allow-contrib": false, 59 | "require": "5.3.*" 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /frameworks/spiral/app/src/Bootloader/RoutesBootloader.php: -------------------------------------------------------------------------------- 1 | setRoute( 33 | 'html', 34 | new Route('/.html', new Controller(HomeController::class)) 35 | ); 36 | 37 | // fallback (default) route 38 | $router->setDefault($this->defaultRoute()); 39 | } 40 | 41 | /** 42 | * Default route points to namespace of controllers. 43 | * 44 | * @return RouteInterface 45 | */ 46 | protected function defaultRoute(): RouteInterface 47 | { 48 | // handle all /controller/action like urls 49 | $route = new Route( 50 | '/[[/]]', 51 | new Namespaced('App\\Controller') 52 | ); 53 | 54 | return $route->withDefaults([ 55 | 'controller' => 'home', 56 | 'action' => 'index', 57 | ]); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/event/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "framework-compatibility-project/event", 3 | "description": "Add event library which integrate itself into other frameworks.", 4 | "type": "library", 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "Alexander Schranz", 9 | "email": "alexander@sulu.io" 10 | } 11 | ], 12 | "require": { 13 | "php": "^8.0", 14 | "webmozart/assert": "^1.10", 15 | "psr/event-dispatcher": "^1.0" 16 | }, 17 | "require-dev": { 18 | "symfony/phpunit-bridge": "^5.3", 19 | "friendsofphp/php-cs-fixer": "^3.0", 20 | "qossmic/deptrac-shim": "^0.14.1", 21 | "doctrine/orm": "^2.9", 22 | "doctrine/collections": "^1.6", 23 | "symfony/cache": "^5.3", 24 | "cycle/orm": "^1.5", 25 | "cycle/schema-builder": "^1.2" 26 | }, 27 | "autoload": { 28 | "psr-4": { 29 | "FrameworkCompatibilityProject\\Event\\": "src/" 30 | } 31 | }, 32 | "autoload-dev": { 33 | "psr-4": { 34 | "FrameworkCompatibilityProject\\Event\\Tests\\": "tests/" 35 | } 36 | }, 37 | "scripts": { 38 | "lint": [ 39 | "@php-cs", 40 | "@lint-deptrac" 41 | ], 42 | "php-cs": "@php vendor/bin/php-cs-fixer fix --verbose --diff --dry-run", 43 | "php-cs-fix": "@php vendor/bin/php-cs-fixer fix", 44 | "lint-deptrac": "@php vendor/bin/deptrac", 45 | "test": "@php vendor/bin/simple-phpunit", 46 | "test-with-coverage": "@test --coverage-php tests/var/reports/coverage.php --coverage-html tests/var/reports/html --log-junit tests/var/reports/junit.xml" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/event/.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | in(__DIR__) 5 | ->exclude(['var', 'node_modules', 'tests/var', 'tests/reports/coverage.php']) 6 | ; 7 | 8 | return (new PhpCsFixer\Config()) 9 | ->setRiskyAllowed(true) 10 | ->setRules([ 11 | '@Symfony' => true, 12 | '@Symfony:risky' => true, 13 | 'ordered_imports' => true, 14 | 'concat_space' => ['spacing' => 'one'], 15 | 'array_syntax' => ['syntax' => 'short'], 16 | 'phpdoc_align' => false, 17 | 'class_definition' => [ 18 | 'multi_line_extends_each_single_line' => true, 19 | ], 20 | 'linebreak_after_opening_tag' => true, 21 | 'declare_strict_types' => true, 22 | 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], 23 | 'native_constant_invocation' => true, 24 | 'native_function_casing' => true, 25 | 'native_function_invocation' => true, 26 | 'no_php4_constructor' => true, 27 | 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true], 28 | 'no_unreachable_default_argument_value' => true, 29 | 'no_useless_else' => true, 30 | 'no_useless_return' => true, 31 | 'php_unit_strict' => true, 32 | 'phpdoc_order' => true, 33 | 'semicolon_after_instruction' => true, 34 | 'strict_comparison' => true, 35 | 'strict_param' => true, 36 | 'array_indentation' => true, 37 | 'multiline_whitespace_before_semicolons' => true, 38 | 'single_line_throw' => false, 39 | 'visibility_required' => ['elements' => ['property', 'method', 'const']], 40 | ]) 41 | ->setFinder($finder) 42 | ; 43 | -------------------------------------------------------------------------------- /frameworks/laravel/config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /frameworks/cake/webroot/css/home.css: -------------------------------------------------------------------------------- 1 | /* Home page styles */ 2 | @font-face { 3 | font-family: 'cakefont'; 4 | src: url('../font/cakedingbats-webfont.eot'); 5 | src: url('../font/cakedingbats-webfont.eot?#iefix') format('embedded-opentype'), 6 | url('../font/cakedingbats-webfont.woff2') format('woff2'), 7 | url('../font/cakedingbats-webfont.woff') format('woff'), 8 | url('../font/cakedingbats-webfont.ttf') format('truetype'), 9 | url('../font/cakedingbats-webfont.svg#cake_dingbatsregular') format('svg'); 10 | font-weight: normal; 11 | font-style: normal; 12 | } 13 | body { 14 | padding: 60px 0; 15 | } 16 | header { 17 | margin-bottom: 60px; 18 | } 19 | img { 20 | margin-bottom: 30px; 21 | } 22 | h1 { 23 | font-weight: bold; 24 | } 25 | ul { 26 | list-style-type: none; 27 | margin: 0 0 30px 0; 28 | padding-left: 25px; 29 | } 30 | a { 31 | color: #0071BC; 32 | text-decoration: underline; 33 | } 34 | hr { 35 | border-bottom: 1px solid #e7e7e7; 36 | border-top: 0; 37 | margin-bottom: 35px; 38 | } 39 | 40 | .text-center { 41 | text-align: center; 42 | } 43 | .links a { 44 | margin-right: 10px; 45 | } 46 | .release-name { 47 | color: #D33C43; 48 | font-weight: 400; 49 | font-style: italic; 50 | } 51 | .bullet:before { 52 | font-family: 'cakefont', sans-serif; 53 | font-size: 18px; 54 | display: inline-block; 55 | margin-left: -1.3em; 56 | width: 1.2em; 57 | -webkit-font-smoothing: antialiased; 58 | -moz-osx-font-smoothing: grayscale; 59 | vertical-align: -1px; 60 | } 61 | .success:before { 62 | color: #88c671; 63 | content: "\0056"; 64 | } 65 | .problem:before { 66 | color: #d33d44; 67 | content: "\0057"; 68 | } 69 | .cake-error { 70 | padding: 10px; 71 | margin: 10px 0; 72 | } 73 | -------------------------------------------------------------------------------- /frameworks/cake/src/Controller/AppController.php: -------------------------------------------------------------------------------- 1 | loadComponent('FormProtection');` 37 | * 38 | * @return void 39 | */ 40 | public function initialize(): void 41 | { 42 | parent::initialize(); 43 | 44 | $this->loadComponent('RequestHandler'); 45 | $this->loadComponent('Flash'); 46 | 47 | /* 48 | * Enable the following component for recommended CakePHP form protection settings. 49 | * see https://book.cakephp.org/4/en/controllers/components/form-protection.html 50 | */ 51 | //$this->loadComponent('FormProtection'); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /frameworks/spiral/tests/Traits/InteractsWithConsole.php: -------------------------------------------------------------------------------- 1 | app->get(Console::class); 28 | } 29 | 30 | public function runCommand(string $command, array $args = []): string 31 | { 32 | $input = new ArrayInput($args); 33 | $output = new BufferedOutput(); 34 | 35 | $this->console()->run($command, $input, $output); 36 | 37 | return $output->fetch(); 38 | } 39 | 40 | public function runCommandDebug(string $command, array $args = [], OutputInterface $output = null): string 41 | { 42 | $input = new ArrayInput($args); 43 | $output = $output ?? new BufferedOutput(); 44 | $output->setVerbosity(BufferedOutput::VERBOSITY_VERBOSE); 45 | 46 | $this->console()->run($command, $input, $output); 47 | 48 | return $output->fetch(); 49 | } 50 | 51 | public function runCommandVeryVerbose(string $command, array $args = [], OutputInterface $output = null): string 52 | { 53 | $input = new ArrayInput($args); 54 | $output = $output ?? new BufferedOutput(); 55 | $output->setVerbosity(BufferedOutput::VERBOSITY_DEBUG); 56 | 57 | $this->console()->run($command, $input, $output); 58 | 59 | return $output->fetch(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/event/tests/Domain/Exception/EventTranslationNotFoundExceptionTest.php: -------------------------------------------------------------------------------- 1 | 1, 23 | 'object' => new \stdClass(), 24 | 'array' => [ 25 | 'more' => 'test', 26 | ], 27 | ]); 28 | 29 | $this->assertSame( 30 | 'The event translation with "id" 1 and "object" stdClass and "array" {"more":"test"} not found for event 42.', 31 | $exception->getMessage() 32 | ); 33 | } 34 | 35 | public function testGetMessageWithoutId(): void 36 | { 37 | $event = new Event('en'); 38 | 39 | $exception = new EventTranslationNotFoundException($event, [ 40 | 'id' => 1, 41 | 'object' => new \stdClass(), 42 | 'array' => [ 43 | 'more' => 'test', 44 | ], 45 | ]); 46 | 47 | $this->assertStringStartsWith( 48 | 'The event translation with "id" 1 and "object" stdClass and "array" {"more":"test"} not found for ', 49 | $exception->getMessage() 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /frameworks/cake/config/requirements.php: -------------------------------------------------------------------------------- 1 | = 50.1 is needed to use CakePHP. Please update the `libicu` package of your system.' . PHP_EOL, E_USER_ERROR); 39 | } 40 | 41 | /* 42 | * You can remove this if you are confident you have mbstring installed. 43 | */ 44 | if (!extension_loaded('mbstring')) { 45 | trigger_error('You must enable the mbstring extension to use CakePHP.', E_USER_ERROR); 46 | } 47 | -------------------------------------------------------------------------------- /src/event/tests/Application/MessageHandler/CreateEventMessageHandlerTest.php: -------------------------------------------------------------------------------- 1 | eventRepository = new InMemoryEventRepository(); 29 | $this->handler = new CreateEventMessageHandler( 30 | $this->eventRepository, 31 | [new EventDataMapper()] 32 | ); 33 | } 34 | 35 | public function testInvoke(): void 36 | { 37 | $message = new CreateEventMessage([ 38 | 'locale' => 'sv', 39 | 'title' => 'Create Title', 40 | ]); 41 | 42 | $event = $this->handler->__invoke($message); 43 | $id = $event->getId(); 44 | 45 | $event = $this->eventRepository->getOneBy(['id' => $id]); 46 | $eventTranslation = $event->getTranslation('sv'); 47 | $this->assertSame('sv', $eventTranslation->getLocale()); 48 | $this->assertSame('Create Title', $eventTranslation->getTitle()); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /frameworks/laminas/module/Application/test/Controller/IndexControllerTest.php: -------------------------------------------------------------------------------- 1 | setApplicationConfig(ArrayUtils::merge( 22 | include __DIR__ . '/../../../../config/application.config.php', 23 | $configOverrides 24 | )); 25 | 26 | parent::setUp(); 27 | } 28 | 29 | public function testIndexActionCanBeAccessed(): void 30 | { 31 | $this->dispatch('/', 'GET'); 32 | $this->assertResponseStatusCode(200); 33 | $this->assertModuleName('application'); 34 | $this->assertControllerName(IndexController::class); // as specified in router's controller name alias 35 | $this->assertControllerClass('IndexController'); 36 | $this->assertMatchedRouteName('home'); 37 | } 38 | 39 | public function testIndexActionViewModelTemplateRenderedWithinLayout(): void 40 | { 41 | $this->dispatch('/', 'GET'); 42 | $this->assertQuery('.container .jumbotron'); 43 | } 44 | 45 | public function testInvalidRouteDoesNotCrash(): void 46 | { 47 | $this->dispatch('/invalid/route', 'GET'); 48 | $this->assertResponseStatusCode(404); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /frameworks/laravel/bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /frameworks/spiral/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spiral/app", 3 | "type": "project", 4 | "license": "MIT", 5 | "description": "Spiral Skeleton Application", 6 | "homepage": "https://spiral.dev", 7 | "support": { 8 | "issues": "https://github.com/spiral/app/issues", 9 | "source": "https://github.com/spiral/app" 10 | }, 11 | "authors": [ 12 | { 13 | "name": "Wolfy-J", 14 | "email": "wolfy.jd@gmail.com" 15 | } 16 | ], 17 | "require": { 18 | "php": ">=7.2", 19 | "ext-mbstring": "*", 20 | "spiral/framework": "^2.8", 21 | "spiral/jobs": "^2.0", 22 | "spiral/roadrunner": "^1.4", 23 | "spiral/database": "^2.3", 24 | "spiral/migrations": "^2.0", 25 | "spiral/nyholm-bridge": "^1.0", 26 | "cycle/orm": "^1.0", 27 | "cycle/proxy-factory": "^1.0", 28 | "cycle/annotated": "^2.0", 29 | "cycle/migrations": "^1.0" 30 | }, 31 | "require-dev": { 32 | "phpunit/phpunit": "^8.5|^9.0" 33 | }, 34 | "scripts": { 35 | "post-create-project-cmd": [ 36 | "php -r \"copy('.env.sample', '.env');\"", 37 | "php app.php encrypt:key -m .env", 38 | "php app.php configure -vv", 39 | "spiral get-binary" 40 | ] 41 | }, 42 | "autoload": { 43 | "psr-4": { 44 | "App\\": "app/src" 45 | } 46 | }, 47 | "autoload-dev": { 48 | "psr-4": { 49 | "Tests\\": "tests" 50 | } 51 | }, 52 | "extra": { 53 | "publish-cmd": "php app.php publish", 54 | "branch-alias": { 55 | "dev-master": "1.4.x-dev" 56 | } 57 | }, 58 | "config": { 59 | "sort-packages": true 60 | }, 61 | "minimum-stability": "dev", 62 | "prefer-stable": true 63 | } 64 | -------------------------------------------------------------------------------- /frameworks/laravel/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": ["framework", "laravel"], 6 | "license": "MIT", 7 | "require": { 8 | "php": "^7.3|^8.0", 9 | "fideloper/proxy": "^4.4", 10 | "fruitcake/laravel-cors": "^2.0", 11 | "guzzlehttp/guzzle": "^7.0.1", 12 | "laravel/framework": "^8.40", 13 | "laravel/tinker": "^2.5" 14 | }, 15 | "require-dev": { 16 | "facade/ignition": "^2.5", 17 | "fakerphp/faker": "^1.9.1", 18 | "laravel/sail": "^1.0.1", 19 | "mockery/mockery": "^1.4.2", 20 | "nunomaduro/collision": "^5.0", 21 | "phpunit/phpunit": "^9.3.3" 22 | }, 23 | "autoload": { 24 | "psr-4": { 25 | "App\\": "app/", 26 | "Database\\Factories\\": "database/factories/", 27 | "Database\\Seeders\\": "database/seeders/" 28 | } 29 | }, 30 | "autoload-dev": { 31 | "psr-4": { 32 | "Tests\\": "tests/" 33 | } 34 | }, 35 | "scripts": { 36 | "post-autoload-dump": [ 37 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 38 | "@php artisan package:discover --ansi" 39 | ], 40 | "post-root-package-install": [ 41 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 42 | ], 43 | "post-create-project-cmd": [ 44 | "@php artisan key:generate --ansi" 45 | ] 46 | }, 47 | "extra": { 48 | "laravel": { 49 | "dont-discover": [] 50 | } 51 | }, 52 | "config": { 53 | "optimize-autoloader": true, 54 | "preferred-install": "dist", 55 | "sort-packages": true 56 | }, 57 | "minimum-stability": "dev", 58 | "prefer-stable": true 59 | } 60 | -------------------------------------------------------------------------------- /frameworks/laravel/artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /frameworks/spiral/tests/TestCase.php: -------------------------------------------------------------------------------- 1 | app = $this->makeApp(); 41 | $this->http = $this->app->get(Http::class); 42 | $this->views = $this->app->get(ViewsInterface::class); 43 | $this->app->get(TranslatorInterface::class)->setLocale('en'); 44 | } 45 | 46 | protected function tearDown(): void 47 | { 48 | $fs = new Files(); 49 | 50 | $runtime = $this->app->get(DirectoriesInterface::class)->get('runtime'); 51 | if ($fs->isDirectory($runtime)) { 52 | $fs->deleteDirectory($runtime); 53 | } 54 | } 55 | 56 | protected function makeApp(array $env = []): TestApp 57 | { 58 | $root = dirname(__DIR__); 59 | 60 | return TestApp::init([ 61 | 'root' => $root, 62 | 'app' => $root . '/app', 63 | 'runtime' => $root . '/runtime/tests', 64 | 'cache' => $root . '/runtime/tests/cache', 65 | ], new Environment($env), false); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /frameworks/cake/tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | 'Cake\Database\Connection', 40 | 'driver' => 'Cake\Database\Driver\Sqlite', 41 | 'database' => TMP . 'debug_kit.sqlite', 42 | 'encoding' => 'utf8', 43 | 'cacheMetadata' => true, 44 | 'quoteIdentifiers' => false, 45 | ]); 46 | 47 | ConnectionManager::alias('test_debug_kit', 'debug_kit'); 48 | 49 | // Fixate sessionid early on, as php7.2+ 50 | // does not allow the sessionid to be set after stdout 51 | // has been written to. 52 | session_id('cli'); 53 | -------------------------------------------------------------------------------- /frameworks/laravel/public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = tap($kernel->handle( 52 | $request = Request::capture() 53 | ))->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /frameworks/laravel/app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 39 | 40 | $this->routes(function () { 41 | Route::prefix('api') 42 | ->middleware('api') 43 | ->namespace($this->namespace) 44 | ->group(base_path('routes/api.php')); 45 | 46 | Route::middleware('web') 47 | ->namespace($this->namespace) 48 | ->group(base_path('routes/web.php')); 49 | }); 50 | } 51 | 52 | /** 53 | * Configure the rate limiters for the application. 54 | * 55 | * @return void 56 | */ 57 | protected function configureRateLimiting() 58 | { 59 | RateLimiter::for('api', function (Request $request) { 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /frameworks/laravel/config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'ably' => [ 45 | 'driver' => 'ably', 46 | 'key' => env('ABLY_KEY'), 47 | ], 48 | 49 | 'redis' => [ 50 | 'driver' => 'redis', 51 | 'connection' => 'default', 52 | ], 53 | 54 | 'log' => [ 55 | 'driver' => 'log', 56 | ], 57 | 58 | 'null' => [ 59 | 'driver' => 'null', 60 | ], 61 | 62 | ], 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /frameworks/cake/webroot/css/normalize.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using clean-css v4.2.1. 3 | * Original file: /npm/normalize.css@8.0.1/normalize.css 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ 8 | html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} 9 | -------------------------------------------------------------------------------- /frameworks/cake/.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | - '4.next' 8 | pull_request: 9 | branches: 10 | - '*' 11 | 12 | jobs: 13 | testsuite: 14 | runs-on: ubuntu-18.04 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | php-version: ['7.2', '7.4', '8.0'] 19 | name: PHP ${{ matrix.php-version }} 20 | 21 | steps: 22 | - uses: actions/checkout@v2 23 | 24 | - name: Setup PHP 25 | uses: shivammathur/setup-php@v2 26 | with: 27 | php-version: ${{ matrix.php-version }} 28 | extensions: mbstring, intl, pdo_sqlite, pdo_mysql 29 | coverage: none 30 | 31 | - name: Composer install 32 | run: | 33 | if [[ ${{ matrix.php-version }} == '8.0' ]]; then 34 | composer install --ignore-platform-reqs 35 | else 36 | composer install 37 | fi 38 | composer run-script post-install-cmd --no-interaction 39 | 40 | - name: Run PHPUnit 41 | run: | 42 | vendor/bin/phpunit 43 | 44 | coding-standard: 45 | name: Coding Standard 46 | runs-on: ubuntu-18.04 47 | 48 | steps: 49 | - uses: actions/checkout@v2 50 | 51 | - name: Setup PHP 52 | uses: shivammathur/setup-php@v2 53 | with: 54 | php-version: '7.2' 55 | extensions: mbstring, intl 56 | coverage: none 57 | 58 | - name: Composer install 59 | run: composer install 60 | 61 | - name: Run PHP CodeSniffer 62 | run: composer cs-check 63 | 64 | static-analysis: 65 | name: Static Analysis 66 | runs-on: ubuntu-18.04 67 | 68 | steps: 69 | - uses: actions/checkout@v2 70 | 71 | - name: Setup PHP 72 | uses: shivammathur/setup-php@v2 73 | with: 74 | php-version: '7.2' 75 | extensions: mbstring, intl 76 | coverage: none 77 | 78 | - name: Composer install 79 | run: composer require --dev phpstan/phpstan:^0.12 80 | 81 | - name: Run phpstan 82 | run: vendor/bin/phpstan.phar analyse 83 | -------------------------------------------------------------------------------- /frameworks/cake/README.md: -------------------------------------------------------------------------------- 1 | # CakePHP Application Skeleton 2 | 3 | ![Build Status](https://github.com/cakephp/app/actions/workflows/ci.yml/badge.svg?branch=master) 4 | [![Total Downloads](https://img.shields.io/packagist/dt/cakephp/app.svg?style=flat-square)](https://packagist.org/packages/cakephp/app) 5 | [![PHPStan](https://img.shields.io/badge/PHPStan-level%207-brightgreen.svg?style=flat-square)](https://github.com/phpstan/phpstan) 6 | 7 | A skeleton for creating applications with [CakePHP](https://cakephp.org) 4.x. 8 | 9 | The framework source code can be found here: [cakephp/cakephp](https://github.com/cakephp/cakephp). 10 | 11 | ## Installation 12 | 13 | 1. Download [Composer](https://getcomposer.org/doc/00-intro.md) or update `composer self-update`. 14 | 2. Run `php composer.phar create-project --prefer-dist cakephp/app [app_name]`. 15 | 16 | If Composer is installed globally, run 17 | 18 | ```bash 19 | composer create-project --prefer-dist cakephp/app 20 | ``` 21 | 22 | In case you want to use a custom app dir name (e.g. `/myapp/`): 23 | 24 | ```bash 25 | composer create-project --prefer-dist cakephp/app myapp 26 | ``` 27 | 28 | You can now either use your machine's webserver to view the default home page, or start 29 | up the built-in webserver with: 30 | 31 | ```bash 32 | bin/cake server -p 8765 33 | ``` 34 | 35 | Then visit `http://localhost:8765` to see the welcome page. 36 | 37 | ## Update 38 | 39 | Since this skeleton is a starting point for your application and various files 40 | would have been modified as per your needs, there isn't a way to provide 41 | automated upgrades, so you have to do any updates manually. 42 | 43 | ## Configuration 44 | 45 | Read and edit the environment specific `config/app_local.php` and setup the 46 | `'Datasources'` and any other configuration relevant for your application. 47 | Other environment agnostic settings can be changed in `config/app.php`. 48 | 49 | ## Layout 50 | 51 | The app skeleton uses [Milligram](https://milligram.io/) (v1.3) minimalist CSS 52 | framework by default. You can, however, replace it with any other library or 53 | custom styles. 54 | -------------------------------------------------------------------------------- /frameworks/cake/src/Controller/ErrorController.php: -------------------------------------------------------------------------------- 1 | loadComponent('RequestHandler'); 36 | } 37 | 38 | /** 39 | * beforeFilter callback. 40 | * 41 | * @param \Cake\Event\EventInterface $event Event. 42 | * @return \Cake\Http\Response|null|void 43 | */ 44 | public function beforeFilter(EventInterface $event) 45 | { 46 | } 47 | 48 | /** 49 | * beforeRender callback. 50 | * 51 | * @param \Cake\Event\EventInterface $event Event. 52 | * @return \Cake\Http\Response|null|void 53 | */ 54 | public function beforeRender(EventInterface $event) 55 | { 56 | parent::beforeRender($event); 57 | 58 | $this->viewBuilder()->setTemplatePath('Error'); 59 | } 60 | 61 | /** 62 | * afterFilter callback. 63 | * 64 | * @param \Cake\Event\EventInterface $event Event. 65 | * @return \Cake\Http\Response|null|void 66 | */ 67 | public function afterFilter(EventInterface $event) 68 | { 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /frameworks/cake/templates/layout/default.php: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | Html->charset() ?> 23 | 24 | 25 | <?= $cakeDescription ?>: 26 | <?= $this->fetch('title') ?> 27 | 28 | Html->meta('icon') ?> 29 | 30 | 31 | 32 | Html->css(['normalize.min', 'milligram.min', 'cake']) ?> 33 | 34 | fetch('meta') ?> 35 | fetch('css') ?> 36 | fetch('script') ?> 37 | 38 | 39 | 48 |
49 |
50 | Flash->render() ?> 51 | fetch('content') ?> 52 |
53 |
54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /frameworks/laminas/module/Application/config/module.config.php: -------------------------------------------------------------------------------- 1 | [ 13 | 'routes' => [ 14 | 'home' => [ 15 | 'type' => Literal::class, 16 | 'options' => [ 17 | 'route' => '/', 18 | 'defaults' => [ 19 | 'controller' => Controller\IndexController::class, 20 | 'action' => 'index', 21 | ], 22 | ], 23 | ], 24 | 'application' => [ 25 | 'type' => Segment::class, 26 | 'options' => [ 27 | 'route' => '/application[/:action]', 28 | 'defaults' => [ 29 | 'controller' => Controller\IndexController::class, 30 | 'action' => 'index', 31 | ], 32 | ], 33 | ], 34 | ], 35 | ], 36 | 'controllers' => [ 37 | 'factories' => [ 38 | Controller\IndexController::class => InvokableFactory::class, 39 | ], 40 | ], 41 | 'view_manager' => [ 42 | 'display_not_found_reason' => true, 43 | 'display_exceptions' => true, 44 | 'doctype' => 'HTML5', 45 | 'not_found_template' => 'error/404', 46 | 'exception_template' => 'error/index', 47 | 'template_map' => [ 48 | 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', 49 | 'application/index/index' => __DIR__ . '/../view/application/index/index.phtml', 50 | 'error/404' => __DIR__ . '/../view/error/404.phtml', 51 | 'error/index' => __DIR__ . '/../view/error/index.phtml', 52 | ], 53 | 'template_path_stack' => [ 54 | __DIR__ . '/../view', 55 | ], 56 | ], 57 | ]; 58 | -------------------------------------------------------------------------------- /src/event/tests/Application/MessageHandler/RemoveEventMessageHandlerTest.php: -------------------------------------------------------------------------------- 1 | eventRepository = new InMemoryEventRepository(); 29 | $this->handler = new RemoveEventMessageHandler($this->eventRepository); 30 | } 31 | 32 | public function testInvokeNotExist(): void 33 | { 34 | $this->expectException(EventNotFoundException::class); 35 | 36 | $message = new RemoveEventMessage([ 37 | 'id' => \PHP_INT_MAX, 38 | ]); 39 | 40 | $this->handler->__invoke($message); 41 | } 42 | 43 | public function testInvoke(): void 44 | { 45 | $event = $this->eventRepository->create('sv'); 46 | $this->eventRepository->createTranslation($event, 'sv') 47 | ->setTitle('Create Title'); 48 | 49 | $this->eventRepository->add($event); 50 | $id = $event->getId(); 51 | 52 | $this->assertNotNull($this->eventRepository->findOneBy(['id' => $id])); 53 | 54 | $message = new RemoveEventMessage([ 55 | 'id' => $id, 56 | ]); 57 | 58 | $this->handler->__invoke($message); 59 | 60 | $this->assertNull($this->eventRepository->findOneBy(['id' => $id])); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /frameworks/laminas/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | VAGRANTFILE_API_VERSION = '2' 5 | 6 | @script = <