# \#expressive

**URL:** https://discourse.laminas.dev/tag/expressive/4.md?match_all_tags=true&tags%5B%5D=expressive

[Latest](https://discourse.laminas.dev/latest.md) · [Categories](https://discourse.laminas.dev/categories.md) · [Tags](https://discourse.laminas.dev/tags.md)

---

## [Alternative to "include" directive in plugins](https://discourse.laminas.dev/t/alternative-to-include-directive-in-plugins/3972)

<div class="topic-metadata">

**Author:** [@richyg](https://discourse.laminas.dev/u/richyg)\
**Replies:** 0\
**Last updated:** [November 7, 2025, 4:00am UTC](https://discourse.laminas.dev/t/alternative-to-include-directive-in-plugins/3972 "2025-11-07T04:00:46Z")

</div>

Is there an alternative to the old “include” directive to add scripts to files such as plugins. The objective is to be able to edit methods to a plugin without the need to search through the whole plugin file. Instead ju…

---

## [Strange behaviour of ImplicitOptionsMiddleware with multiple route on same path](https://discourse.laminas.dev/t/strange-behaviour-of-implicitoptionsmiddleware-with-multiple-route-on-same-path/496)

<div class="topic-metadata">

**Author:** [@dominicdettabp](https://discourse.laminas.dev/u/dominicdettabp)\
**Replies:** 25\
**Last updated:** [May 5, 2018, 8:52pm UTC](https://discourse.laminas.dev/t/strange-behaviour-of-implicitoptionsmiddleware-with-multiple-route-on-same-path/496 "2018-05-05T20:52:51Z")

</div>

I’m trying to retrieve the allowed methods for a specific endpoint. The problem is when I try to do a OPTIONS request the ImplicitOptionsMiddleware match only the last route configured and retrieves the corrisponding al…

---

## [How to create Datarepository? Similary UserRepository](https://discourse.laminas.dev/t/how-to-create-datarepository-similary-userrepository/2706)

<div class="topic-metadata">

**Author:** [@Jose\_Antonio\_Campos](https://discourse.laminas.dev/u/Jose_Antonio_Campos)\
**Replies:** 0\
**Last updated:** [January 11, 2022, 9:47am UTC](https://discourse.laminas.dev/t/how-to-create-datarepository-similary-userrepository/2706 "2022-01-11T09:47:07Z")

</div>

I’m trying to create something like the UserRepository of mezzio-authentication. Let me explain, I want to have the possibility of creating adapters, so that the data of the module that I am developing, can be obtained …

---

## [Zend Expressive Authentication with doctrine](https://discourse.laminas.dev/t/zend-expressive-authentication-with-doctrine/1173)

<div class="topic-metadata">

**Author:** [@KickSheepSon](https://discourse.laminas.dev/u/KickSheepSon)\
**Replies:** 4\
**Last updated:** [January 3, 2022, 7:49am UTC](https://discourse.laminas.dev/t/zend-expressive-authentication-with-doctrine/1173 "2022-01-03T07:49:46Z")

</div>

Greetings. i am trying to create a login page with zend auth. Therefore iam reading the tutorial on: https://samsonasik.wordpress.com/2018/01/12/create-login-functionality-in-expressive-3/ \<?php // config/autoload/depe…

---

## [How can I set up mezzio to run a legacy app with user authorization/authentication?](https://discourse.laminas.dev/t/how-can-i-set-up-mezzio-to-run-a-legacy-app-with-user-authorization-authentication/2606)

<div class="topic-metadata">

**Author:** [@dennis-fedco](https://discourse.laminas.dev/u/dennis-fedco)\
**Replies:** 1\
**Last updated:** [December 15, 2021, 2:35pm UTC](https://discourse.laminas.dev/t/how-can-i-set-up-mezzio-to-run-a-legacy-app-with-user-authorization-authentication/2606 "2021-12-15T14:35:30Z")

</div>

Hi. I am trying to set up mezzio to run a legacy app. I’ve heard of a legacy middleware approach where I can build my own LegacyMiddleware, place it after the DispatchMiddleware, and any requests that “fall through” pa…

---

## [Does anyone have a good test component for integration test in expressive?](https://discourse.laminas.dev/t/does-anyone-have-a-good-test-component-for-integration-test-in-expressive/851)

<div class="topic-metadata">

**Author:** [@Moln](https://discourse.laminas.dev/u/Moln)\
**Replies:** 8\
**Last updated:** [December 9, 2020, 7:23am UTC](https://discourse.laminas.dev/t/does-anyone-have-a-good-test-component-for-integration-test-in-expressive/851 "2020-12-09T07:23:11Z")

</div>

Expressive have not a integration test component like as zend-test. So I wrote this component zfegg/expressive-test. Usage: public function testHome() { // $response = $this-\>runApp('GET', '/'); // Test…

---

## [Doctrine Migrations do not work in Mezzio](https://discourse.laminas.dev/t/doctrine-migrations-do-not-work-in-mezzio/1635)

<div class="topic-metadata">

**Author:** [@drakulitka](https://discourse.laminas.dev/u/drakulitka)\
**Replies:** 3\
**Last updated:** [May 21, 2020, 12:48pm UTC](https://discourse.laminas.dev/t/doctrine-migrations-do-not-work-in-mezzio/1635 "2020-05-21T12:48:04Z")

</div>

What am I doing wrong? used roave/psr-container-doctrine config/cli-config.php $container = require \_\_DIR\_\_ . '/container.php'; $entityManager = $container-\>get(\\Doctrine\\ORM\\EntityManager::class); $migrationsConfigura…

---

## [Benchmarking laminas](https://discourse.laminas.dev/t/benchmarking-laminas/1450)

<div class="topic-metadata">

**Author:** [@waghanza](https://discourse.laminas.dev/u/waghanza)\
**Replies:** 0\
**Last updated:** [March 18, 2020, 2:21pm UTC](https://discourse.laminas.dev/t/benchmarking-laminas/1450 "2020-03-18T14:21:25Z")

</div>

Hello, I have migrate zend-framework and zend-expressive to laminas and mezzio in my benchmarking project Feel free to contribute :heart: and to correct the code (if any mistake) Regards,

---

## [OAuth2 with Expressive 2 - Config help needed](https://discourse.laminas.dev/t/oauth2-with-expressive-2-config-help-needed/470)

<div class="topic-metadata">

**Author:** [@MichaelB](https://discourse.laminas.dev/u/MichaelB)\
**Replies:** 18\
**Last updated:** [December 13, 2019, 5:16pm UTC](https://discourse.laminas.dev/t/oauth2-with-expressive-2-config-help-needed/470 "2019-12-13T17:16:39Z")

</div>

Hi, I progress on my new api rest project and is time to include some authentication… I know that it exist https://docs.zendframework.com/zend-expressive-authentication-oauth2/ , it is exactly what i need but it still i…

---

## [CSRF and expired session](https://discourse.laminas.dev/t/csrf-and-expired-session/1247)

<div class="topic-metadata">

**Author:** [@jbelien](https://discourse.laminas.dev/u/jbelien)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 3:11pm UTC](https://discourse.laminas.dev/t/csrf-and-expired-session/1247 "2019-11-12T15:11:30Z")

</div>

Hello everyone, I started using zend-expressive-csrf to protect my login page against CSRF following the documentation (CSRF Guards and CSRF Guard Middleware). It works (of course) really great except when the session …

---

## [A Web application firewall middleware for Zend framework](https://discourse.laminas.dev/t/a-web-application-firewall-middleware-for-zend-framework/1220)

<div class="topic-metadata">

**Author:** [@terrylinooo](https://discourse.laminas.dev/u/terrylinooo)\
**Replies:** 1\
**Last updated:** [October 14, 2019, 4:09pm UTC](https://discourse.laminas.dev/t/a-web-application-firewall-middleware-for-zend-framework/1220 "2019-10-14T16:09:14Z")

</div>

Hello. I have just launched the project website shieldon.io for my new work - Shieldon Firewall. The guides for Zend expressive and MVC are here: https://shieldon.io/en/guide/zend.html I hope you like it.

---

## [Routes specific for Expressive modules](https://discourse.laminas.dev/t/routes-specific-for-expressive-modules/206)

<div class="topic-metadata">

**Author:** [@enrico](https://discourse.laminas.dev/u/enrico)\
**Replies:** 11\
**Last updated:** [October 6, 2019, 2:18pm UTC](https://discourse.laminas.dev/t/routes-specific-for-expressive-modules/206 "2019-10-06T14:18:50Z")

</div>

If an Expressive module needs to add specific routes to the Application, how it can do that? A first idea is to use an Application delegator, as reported here but I feel like an over engineered solution. The simplest so…

---

## [Will expressive replace ZF3(MVC)/Laminas in the future?](https://discourse.laminas.dev/t/will-expressive-replace-zf3-mvc-laminas-in-the-future/1208)

<div class="topic-metadata">

**Author:** [@testuser](https://discourse.laminas.dev/u/testuser)\
**Replies:** 3\
**Last updated:** [October 4, 2019, 2:17pm UTC](https://discourse.laminas.dev/t/will-expressive-replace-zf3-mvc-laminas-in-the-future/1208 "2019-10-04T14:17:20Z")

</div>

I am trying to use ZF3 (MVC) for last few months. I didn’t try expressive (at least I didn’t spend a lot of time learning it). As I understand expressive was created to be compliant with PSR. ZF3 has some issue in implem…

---

## [Composer install zend-expressive-authentication-oauth2 does not inject config provider to config.php](https://discourse.laminas.dev/t/composer-install-zend-expressive-authentication-oauth2-does-not-inject-config-provider-to-config-php/1175)

<div class="topic-metadata">

**Author:** [@stark](https://discourse.laminas.dev/u/stark)\
**Replies:** 4\
**Last updated:** [September 1, 2019, 8:33pm UTC](https://discourse.laminas.dev/t/composer-install-zend-expressive-authentication-oauth2-does-not-inject-config-provider-to-config-php/1175 "2019-09-01T20:33:43Z")

</div>

Hi, it looks like running: composer require zendframework/zend-expressive-authentication-oauth2 does not inject the config provider for zend-expressive-authentication-oauth2. Only the config for \\Zend\\Expressive\\Aut…

---

## [Error : composer require --dev zendframework/zend-expressive-tooling](https://discourse.laminas.dev/t/error-composer-require-dev-zendframework-zend-expressive-tooling/1135)

<div class="topic-metadata">

**Author:** [@AndreyUkraine](https://discourse.laminas.dev/u/AndreyUkraine)\
**Replies:** 9\
**Last updated:** [August 27, 2019, 5:58pm UTC](https://discourse.laminas.dev/t/error-composer-require-dev-zendframework-zend-expressive-tooling/1135 "2019-08-27T17:58:06Z")

</div>

I want to install ----- zend-expressive-tooling, Enter – $ composer require --dev zendframework/zend-expressive-tooling Result : Install nothing or upgrade The http-interop / http-middleware package is left, you s…

---

## [Additional Oauth2 providers in phly-expressive-oauth2clientauthentication](https://discourse.laminas.dev/t/additional-oauth2-providers-in-phly-expressive-oauth2clientauthentication/1069)

<div class="topic-metadata">

**Author:** [@nynka](https://discourse.laminas.dev/u/nynka)\
**Replies:** 8\
**Last updated:** [May 29, 2019, 10:59am UTC](https://discourse.laminas.dev/t/additional-oauth2-providers-in-phly-expressive-oauth2clientauthentication/1069 "2019-05-29T10:59:39Z")

</div>

phly-expressive-oauth2clientauthentication is a really handy library to authenticate against oauth2 providers. However, it’s currently limited to using only officially maintained providers from the League OAuth2 Client p…

---

## [Zend expressive 3 + OAuth2 Server + Authentication](https://discourse.laminas.dev/t/zend-expressive-3-oauth2-server-authentication/758)

<div class="topic-metadata">

**Author:** [@RodriAndreotti](https://discourse.laminas.dev/u/RodriAndreotti)\
**Replies:** 2\
**Last updated:** [April 15, 2019, 1:20pm UTC](https://discourse.laminas.dev/t/zend-expressive-3-oauth2-server-authentication/758 "2019-04-15T13:20:11Z")

</div>

Hello guys! I’m developing a middleware for a system I’m trying to put to run. As I am still starting in Zend Expressive, this week I had a difficulty in the authentication part, I could not find anything documented re…

---

## [Versioning psr-7 apps](https://discourse.laminas.dev/t/versioning-psr-7-apps/719)

<div class="topic-metadata">

**Author:** [@marcguyer](https://discourse.laminas.dev/u/marcguyer)\
**Replies:** 3\
**Last updated:** [April 15, 2019, 12:29pm UTC](https://discourse.laminas.dev/t/versioning-psr-7-apps/719 "2019-04-15T12:29:28Z")

</div>

Hey y’all. I’ve written a middleware package intended to manage API versioning. It’s inspired somewhat by zfcampus/zf-versioning but for Expressive and other PSR-7 apps. Before I go further, I’m looking for feedback. I s…

---

## [How to get the base url Programatically in zend expressive?](https://discourse.laminas.dev/t/how-to-get-the-base-url-programatically-in-zend-expressive/988)

<div class="topic-metadata">

**Author:** [@mmuhasan](https://discourse.laminas.dev/u/mmuhasan)\
**Replies:** 11\
**Last updated:** [March 26, 2019, 10:12pm UTC](https://discourse.laminas.dev/t/how-to-get-the-base-url-programatically-in-zend-expressive/988 "2019-03-26T22:12:46Z")

</div>

I am working on an API application that will be run in different domains: http://example.com/, http://sub.example.com/, http://example-another.com/. Part of the API responses needs to send out its base\_url. So I am tryi…

---

## [Zend-expressive-zendrouter doesnt accept priority feature for route](https://discourse.laminas.dev/t/zend-expressive-zendrouter-doesnt-accept-priority-feature-for-route/980)

<div class="topic-metadata">

**Author:** [@fancybuddy](https://discourse.laminas.dev/u/fancybuddy)\
**Replies:** 0\
**Last updated:** [March 8, 2019, 3:22pm UTC](https://discourse.laminas.dev/t/zend-expressive-zendrouter-doesnt-accept-priority-feature-for-route/980 "2019-03-08T15:22:57Z")

</div>

Hello, i wonder why the ZendRouter doesnt allow to set the PriorityList for routes. This feature is applied in TreeRouteStack (in his extension SimpleRouteStack line 282) but the method injectRoute in zendrouter does n…

---

## [How can I get ServerRequestInterface with attributes in Factory?](https://discourse.laminas.dev/t/how-can-i-get-serverrequestinterface-with-attributes-in-factory/953)

<div class="topic-metadata">

**Author:** [@nepster-web](https://discourse.laminas.dev/u/nepster-web)\
**Replies:** 29\
**Last updated:** [February 26, 2019, 5:59pm UTC](https://discourse.laminas.dev/t/how-can-i-get-serverrequestinterface-with-attributes-in-factory/953 "2019-02-26T17:59:45Z")

</div>

When initializing some services in the factory, I need to get data from the request attributes. How can i do this?

---

## [Login workflow and example for Expressive 3](https://discourse.laminas.dev/t/login-workflow-and-example-for-expressive-3/600)

<div class="topic-metadata">

**Author:** [@MichaelB](https://discourse.laminas.dev/u/MichaelB)\
**Replies:** 7\
**Last updated:** [February 16, 2019, 12:43pm UTC](https://discourse.laminas.dev/t/login-workflow-and-example-for-expressive-3/600 "2019-02-16T12:43:05Z")

</div>

Hi, I started a new project with Expressive 3. I need authentication with a login page, users in a database, … basic things at this time. I found only one example of login process that @samsonasik made (https://samsona…

---

## [Valid Stream Upload File](https://discourse.laminas.dev/t/valid-stream-upload-file/669)

<div class="topic-metadata">

**Author:** [@coffeecore](https://discourse.laminas.dev/u/coffeecore)\
**Replies:** 7\
**Last updated:** [December 27, 2018, 3:53pm UTC](https://discourse.laminas.dev/t/valid-stream-upload-file/669 "2018-12-27T15:53:16Z")

</div>

Hi, I try to use Zend Expressive, but I don’t understand how use FileRenameUpload and I can’t valid my form. if ($request-\>getMethod() === 'POST') { $this-\>imageForm-\>setData(array\_merge($request-\>getParsed…

---

## [Zend 1.12.9 How to "Soap Request"](https://discourse.laminas.dev/t/zend-1-12-9-how-to-soap-request/861)

<div class="topic-metadata">

**Author:** [@garciabox](https://discourse.laminas.dev/u/garciabox)\
**Replies:** 1\
**Last updated:** [December 20, 2018, 2:47pm UTC](https://discourse.laminas.dev/t/zend-1-12-9-how-to-soap-request/861 "2018-12-20T14:47:04Z")

</div>

Hi all, I’m a newbie of Zend and now studying about soap request & response. I get a ‘test.wsdl’ file on hand and perform “new Zend\_Soap\_Client(‘test.wsdl’)” on php script. According to the ‘test.wsdl’, I need to pass s…

---

## [How to define routes in ConfigProvider Module](https://discourse.laminas.dev/t/how-to-define-routes-in-configprovider-module/821)

<div class="topic-metadata">

**Author:** [@Luan\_Maik](https://discourse.laminas.dev/u/Luan_Maik)\
**Replies:** 3\
**Last updated:** [November 21, 2018, 7:58pm UTC](https://discourse.laminas.dev/t/how-to-define-routes-in-configprovider-module/821 "2018-11-21T19:58:31Z")

</div>

Hi, How can i define routes inside module’s ConfigProvider.php ? I using expressive 3 with Fast Route. namespace Auth; class ConfigProvider { public function \_\_invoke() { return \[ 'dep…

---

## [How to inject a Translator in a validator](https://discourse.laminas.dev/t/how-to-inject-a-translator-in-a-validator/791)

<div class="topic-metadata">

**Author:** [@dominicdettabp](https://discourse.laminas.dev/u/dominicdettabp)\
**Replies:** 3\
**Last updated:** [October 16, 2018, 9:50am UTC](https://discourse.laminas.dev/t/how-to-inject-a-translator-in-a-validator/791 "2018-10-16T09:50:46Z")

</div>

Hi, my objective is to inject the translator in a validator, but this is the error that is displayed: Argument 1 passed to Zend\\\\Validator\\\\AbstractValidator::setDefaultTranslator() must be an instance of Zend\\\\Validato…

---

## [Zend-expressive - render subdirectories](https://discourse.laminas.dev/t/zend-expressive-render-subdirectories/781)

<div class="topic-metadata">

**Author:** [@Auramel](https://discourse.laminas.dev/u/Auramel)\
**Replies:** 1\
**Last updated:** [October 15, 2018, 10:47am UTC](https://discourse.laminas.dev/t/zend-expressive-render-subdirectories/781 "2018-10-15T10:47:52Z")

</div>

Hello! I have a problem. My template configuration is: 'layout' =\> 'layout::main', 'paths' =\> \[ 'layout' =\> \[ ROOT\_DIRECTORY . '/templates/layouts', \], …

---

## [Which is the good frontend and backend separation structures?](https://discourse.laminas.dev/t/which-is-the-good-frontend-and-backend-separation-structures/770)

<div class="topic-metadata">

**Author:** [@Moln](https://discourse.laminas.dev/u/Moln)\
**Replies:** 2\
**Last updated:** [October 15, 2018, 1:06am UTC](https://discourse.laminas.dev/t/which-is-the-good-frontend-and-backend-separation-structures/770 "2018-10-15T01:06:49Z")

</div>

Frontend and backend separation structures for zend-mvc and expressive. Which structure do you recommend? Solution A: frontend +--- src (CMD JS) +--- test +--- ... +--- webpack.config.js \\--- package.json a…

---

## [Zend-Expressive and Child Routes](https://discourse.laminas.dev/t/zend-expressive-and-child-routes/760)

<div class="topic-metadata">

**Author:** [@MatthiasKuehneEllerh](https://discourse.laminas.dev/u/MatthiasKuehneEllerh)\
**Replies:** 1\
**Last updated:** [October 1, 2018, 5:48pm UTC](https://discourse.laminas.dev/t/zend-expressive-and-child-routes/760 "2018-10-01T17:48:47Z")

</div>

Hello, I wanted to try expressive in a new project and got to the routing configuration. Is there any way to setup child routes ? FastRoute and Zend-Router support them but there is no “expressive way” to configure the…

---

## [Unit testing with session](https://discourse.laminas.dev/t/unit-testing-with-session/742)

<div class="topic-metadata">

**Author:** [@jbelien](https://discourse.laminas.dev/u/jbelien)\
**Replies:** 5\
**Last updated:** [September 21, 2018, 8:50am UTC](https://discourse.laminas.dev/t/unit-testing-with-session/742 "2018-09-21T08:50:06Z")

</div>

Hello everyone, I’m rather new to unit testing (better late than never ^^) and I started using PHPUnit based on Zend Expressive skeleton. I analyzed the 3 available tests and understood how it works. But my applicatio…

[Next page](https://discourse.laminas.dev/tag/expressive/4.md?match_all_tags=true&page=1&tags%5B%5D=expressive)
