9 Commits

Author SHA1 Message Date
Yuriy Belenko
0e9d6b09be
[php-slim4] Add monolog package as default logger (#12137)
* Add monolog to templates

* Remove default values from DI\get helper

It turned out \DI\get expects only single argument, current method call
doesn't throw any errors but it should be corrected anyway.

* Refresh samples
2022-04-16 16:20:05 +08:00
Yuriy Belenko
cd56a4b1a1
[php-slim4] Add Mock Server (#12044)
* Setup Data Mocker as dev dependency

New 1.2.0 version of the package contains required factory class.

* Refresh samples
2022-04-09 09:43:07 +08:00
Yuriy Belenko
7b59e602ed
[php-slim4] Add lazy CORS implementation (#11941)
* Add lazy CORS implementation

While Slim4 doc applies CORS headers via middleware but their code team
member recommends to use custom response emitter.

Ref: https://github.com/slimphp/Slim/issues/2999#issuecomment-1066839414

* Refresh samples
2022-03-23 16:46:23 +08:00
Yuriy Belenko
5c4181d17a
[php-slim4] Tiny config comments (#11875)
* Add config file comments

I found Slim example with more descriptive comments of error settings.
@see b8c6379c70/settings.php.dist

* Refresh samples
2022-03-15 23:36:56 +08:00
Yuriy Belenko
aa61220db2
[php-slim4] Add dependency injection container 2 (#11159)
* Change packages order alphabetically

* Add PHP-DI package to Composer template

* Remove ContainerInterface from APIs

User shouldn't access container directly, it's an anti-pattern.

Ref: https://php-di.org/doc/best-practices.html#rules-for-using-a-container-and-dependency-injection

* Change app templates to use PHP-DI

Application looks more like a default Slim skeleton now.

Ref: https://github.com/slimphp/Slim-Skeleton

* Rename SlimRouter to RegisterRoutes

Since it's callable class new name fits better.

* Add short documentation

* Refresh samples
2021-12-29 10:57:19 +08:00
Yuriy Belenko
186842ea19
[php-slim4] Bump required PHP version to 7.4 (#11039)
* Change minimum PHP version to 7.4

* Refresh samples
2021-12-05 15:47:12 +08:00
Yuriy Belenko
9f92322b90
[php-slim4] Bump required PHP version to 7.3 (#10228)
* Change minimum PHP version to 7.3

* Refresh samples

* Remove PHP8 notice from readme

Signed-off-by: Yuriy Belenko <yura-bely@mail.ru>
2021-10-17 18:19:14 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +08:00
Yuriy Belenko
da9f2f7c9b
[php-slim4] Move config to a separate file (#6971)
* Move config into separated file

* Restrict access from web to config folder

* Exclude config folder from code base

* Update documentation

* Refresh samples

* Fix misplaced pathes
2020-08-29 00:27:03 +08:00