modern-php | Companion code repository for Modern PHP by Josh Lockhart
kandi X-RAY | modern-php Summary
kandi X-RAY | modern-php Summary
The PHP language is different than you remember. No longer just about procedural code and monolithic frameworks, PHP has experienced a renaissance to become a full-featured, mature language with object-orientation, namespaces, and a growing collection of reusable component libraries. Modern PHP reveals these new language features in action. Author Josh Lockhart—creator of PHP The Right Way, a popular community initiative—shows you how to develop PHP applications using best practices for application architecture and planning, databases, security, testing, debugging, and deployment.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of modern-php
modern-php Key Features
modern-php Examples and Code Snippets
Community Discussions
Trending Discussions on modern-php
QUESTION
I want to solve a kata using PHP and test driven development. I would like to use a generator or template to base on a minimal composer project with phpunit.
The minimal project should contain:
- the composer.json with phpunit as require-dev
- the vendor folder
- a sample tests folder with a test file and a source file
I wondered how other developers do that in PHP and found so far the following options:
- use PHPStorm and create a new composer project based on laravel/laravel followed by
php artisan key:generate
as described here and here - use composer init as described in this post
- use php-pds/skeleton followed by
composer require phpunit/phpunit --dev
as described here
What is typical way for a PHP developer to deal with the initial boilerplate in a small php project?
...ANSWER
Answered 2020-Nov-08 at 09:42I can offer you my approach as a reference:
I have a skeleton in PHP with composer and PHPUnit with a class and its test already set up. When I want to challenge a new kata, I just create a new kata and duplicate the skeleton in it (https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/duplicating-a-repository), then updates readme and class names to reflect the kata. Usually, I use master as the reference for the kata to start, and each attempt is a new branch from master.
Here is the link to my repo as a reference, you can fork it or just copy :)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install modern-php
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page