An interactive CLI tool to practice for the Symfony and PHP certification exams.
A lightweight, customizable exam simulator built with Symfony Console components. Practice with separate PHP and Symfony question banks, configure question counts, and get instant feedback with links to official documentation.
- Simulate realistic certification exam conditions with customizable question counts
- Support questions with single or multiple correct answers
- Provide immediate feedback with references to official PHP and Symfony documentation
- Help candidates practice under exam-like conditions with randomized answer ordering
- Question bank: Separate PHP and Symfony question sets in
data/directory - Documentation links: Automatic linking to official PHP and Symfony documentation
- Exam simulator: Customizable exam sessions with configurable question counts
- Interactive CLI: Built with Symfony Console components for a smooth user experience
- Customizable exam sessions: Configure the number of PHP and Symfony questions (default: 50 each)
- Flexible question filtering: Run PHP-only, Symfony-only, or mixed question sets
- Multiple-choice support: Questions with single or multiple correct answers
- Answer randomization: Answer order is shuffled for each question to prevent pattern memorization
- Interactive CLI interface: Progress bar, formatted output, and easy answer selection
- Instant feedback: Immediate correct/incorrect indication after each answer
- Documentation links: Direct links to official PHP and Symfony documentation for incorrect answers
- Score summary: Final results table showing percentage, correct, and incorrect answer counts
The project is organized into the following components:
ExamCommand: Symfony Console command handling user interaction, question presentation, and answer collectionExamFactory: Factory class responsible for creating exam instances with randomized questions based on provided optionsExam: Value object representing an exam session with scoring and percentage calculation methodsQuestion: Value object representing a single question with answers, correct answers, and documentation linksQuestionProvider: Service for loading PHP and Symfony questions from data files
exam-start: CLI entry point that bootstraps the Symfony Console application
php-questions.php: Array of PHP questions covering OOP, SPL, type system, and moresf-questions.php: Array of Symfony framework questions
- PHP >= 8.2
- Standard PHP extensions (no additional special requirements)
- Composer
Download the latest PHAR release:
wget https://github.com/raffaelecarelle/symfony-certification-simulator/releases/latest/download/symfony-certification.phar
chmod +x symfony-certification.phar
./symfony-certification.pharOr install globally:
sudo mv symfony-certification.phar /usr/local/bin/symfony-certification
symfony-certification# Run with default settings (50 PHP + 50 Symfony questions)
./symfony-certification.phar
# Run with only PHP questions
./symfony-certification.phar --php-only
# Run with only Symfony questions
./symfony-certification.phar --sf-only
# Custom number of questions
./symfony-certification.phar --php-questions=30 --sf-questions=70The exam simulator supports several options to customize your practice session:
--php-onlyor-p: Run the exam with only PHP questions--sf-onlyor-S: Run the exam with only Symfony questions--php-questions=N: Set the number of PHP questions (default: 50)--sf-questions=N: Set the number of Symfony questions (default: 50)
Examples:
# Run exam with only PHP questions
php bin/exam-start --php-only
# Run exam with only Symfony questions
php bin/exam-start --sf-only
# Custom number of questions
php bin/exam-start --php-questions=30 --sf-questions=70
# Combined: only PHP questions with custom count
php bin/exam-start --php-only --php-questions=25- Some questions have multiple correct answers: select them by separating with a comma (e.g., "A,C").
- When the answer is incorrect, a link to the corresponding official documentation (if available) will be shown.
- At the end of the exam, a table with percentage, number of correct and incorrect answers is displayed.
- Run tests (PHPUnit):
./vendor/bin/phpunit -c phpunit.xml.dist
- Static analysis (PHPStan):
./vendor/bin/phpstan analyse -c phpstan.neon
- Automated refactoring (Rector):
./vendor/bin/rector
- Formatting and style fixes (PHP-CS-Fixer):
./vendor/bin/php-cs-fixer fix --diff
If you want to contribute to the project, you'll need to clone the repository:
git clone https://github.com/raffaelecarelle/symfony-certification-simulator.git
cd symfony-certification-simulator
composer installContributions of any kind are welcome. Suggested guidelines:
- Open an issue to propose new questions or to fix existing ones.
- For PRs that modify the question bank, keep explanations concise and include a reference (sf-doc/php-doc) when possible.
- Run tests and quality tools locally before opening the PR:
./vendor/bin/phpunit -c phpunit.xml.dist./vendor/bin/phpstan analyse -c phpstan.neon./vendor/bin/php-cs-fixer fix --diff
- Stick to PHP >= 8.2 and the project's current standards.
- This project is released under the GPL-3.0-or-later license. See the LICENSE file.
- UNOFFICIAL project, not affiliated with Symfony or SensioLabs. Trademarks and logos are the property of their respective owners.