Skip to content

Commit 752212a

Browse files
authored
Rewrite Getting Started article: Silex to Slim framework (#70)
* move main app to Slim framework no DI container yet, so no logging * use a DI container * Monolog via DI * use php-di/slim-bridge * use recommended Procfile syntax no vendor/bin/ prefix, since CNB will use a different location * move views out of public web dir
1 parent f9dac98 commit 752212a

10 files changed

+944
-522
lines changed

Procfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: vendor/bin/heroku-php-apache2 web/
1+
web: heroku-php-apache2 web/

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# php-getting-started
22

3-
A barebones PHP app that makes use of the [Silex](http://silex.sensiolabs.org/) web framework, which can easily be deployed to Heroku.
3+
A barebones PHP app that makes use of the [Slim](https://www.slimframework.com/) web framework, which can easily be deployed to Heroku.
44

55
This application supports the [Getting Started with PHP on Heroku](https://devcenter.heroku.com/articles/getting-started-with-php) article - check it out.
66

app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Start on Heroku: PHP",
3-
"description": "A barebones PHP app that makes use of the Silex web framework",
3+
"description": "A barebones PHP app that makes use of the Slim web framework",
44
"repository": "https://github.com/heroku/php-getting-started",
55
"addons": []
66
}

composer.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"require" : {
3-
"silex/silex": "^2.0.4",
4-
"monolog/monolog": "^1.22",
5-
"twig/twig": "^2.0",
6-
"symfony/twig-bridge": "^3"
3+
"php-di/php-di": "^7.0",
4+
"slim/slim": "^4.0",
5+
"php-di/slim-bridge": "^3.1.0",
6+
"slim/psr7": "^1.3.0",
7+
"monolog/monolog": "^3.0",
8+
"twig/twig": "^3.0",
9+
"slim/twig-view": "^3.0"
710
},
811
"require-dev": {
912
"heroku/heroku-buildpack-php": "*"

0 commit comments

Comments
 (0)