settermjd / twilio-slim-base-project
This project the base from which I build my Twilio PHP project.
Fund package maintenance!
Community Bridge
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/settermjd/twilio-slim-base-project
Requires
- monolog/monolog: ^3.10
- php-di/slim-bridge: ^3.4
- slim/psr7: ^1.8
- slim/slim: ^4.15
- twilio/sdk: ^8.10
- vlucas/phpdotenv: ^5.6
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.93
- laminas/laminas-coding-standard: ^3.1
- laminas/laminas-component-installer: ^3.7
- laminas/laminas-diactoros: ^3.8
- phpstan/phpdoc-parser: ^2.3
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^12.5
README
Twilio / Slim Base Project
This is a small, almost skeleton project that I base my PHP projects on which underpin my Twilio tutorials. It's not intended to be special, nor feature-rich. Rather, it's designed to save me time getting started building my next PHP project for an upcoming Twilio tutorial.
It:
- Is a small, web-based PHP application based on the Slim Framework
- Has one route which returns no body, and a minimum of HTTP headers
- Wraps Slim's
Applicationobject in a small utility class to make writing maintainable code easier
Prerequisites
You'll need the following to use the application:
- PHP 8.4 or above
- Composer installed globally
- Your preferred code editor or IDE
- Some terminal experience is helpful, though not required
Quick Start
To create a new project from this project, wherever you store your PHP apps, run the following command:
composer create-project settermjd/twilio-slim-base-project <my-project>
Tip
Replace <my-project> with whatever you want to name the new project directory.
Then, open the Twilio Console in your browser of choice, and copy the Account SID, Auth Token, and phone number from the Account Info, as you can see in the screenshot below.
Then, set those values as the values of TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, and TWILIO_PHONE_NUMBER, respectively, in .env.
Contributing
If you want to contribute to the project, whether you have found issues with it or just want to improve it, here's how:
- Issues: ask questions and submit your feature requests, bug reports, etc
- Pull requests: send your improvements
License
Disclaimer
No warranty expressed or implied. Software is as is.
