This Gist provides a small wrapper script to run PHP inside Docker from WSL, without installing PHP locally.
- WSL installed
- Docker Desktop installed and enabled for your WSL distro
- Bash
| <?php | |
| namespace Vendor\Project\EventListeners; | |
| use TYPO3\CMS\Backend\Search\Event\ModifyResultItemInLiveSearchEvent; | |
| use TYPO3\CMS\Backend\Search\LiveSearch\ResultItemAction; | |
| use TYPO3\CMS\Core\Attribute\AsEventListener; | |
| #[AsEventListener(identifier: 'ext-project/edit-record-as-default-in-live-search-event-listener')] | |
| class EditRecordAsDefaultActionInLiveSearchEventListener |
| <?php | |
| // Adjust database credentials in lines 37-40 | |
| // And just run on CLI | |
| // On very fast devices the amount of time for each test, should be less than 1 second | |
| $start = microtime(true); | |
| for ($i = 0; $i < 100000000; $i++) { | |
| sqrt($i); |
| #!/usr/bin/env php | |
| <?php | |
| use App\Entity\User; | |
| use App\Kernel; | |
| use Doctrine\Bundle\DoctrineBundle\Registry; | |
| if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { | |
| throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); | |
| } |
| header { | |
| width:100%; | |
| position:relative; | |
| top:0; | |
| left:0; | |
| background-color:#006ec0; | |
| color:white; | |
| font-size:50px; | |
| text-align:center; | |
| font-family:Arial; |
| <?php | |
| use TYPO3\CMS\Core\Utility\GeneralUtility; | |
| use TYPO3\CMS\Core\Utility\StringUtility; | |
| use TYPO3\CMS\Extbase\Object\ObjectManager; | |
| trait CreateInstanceTrait | |
| { | |
| /** @return parent */ | |
| public static function createInstance() |
$ ddev start
$ ddev composer install
$ ddev composer run typo3
adminpassword (same for install tool)| <?php declare(strict_types=1); | |
| namespace Armin\Vieweg\ViewHelpers; | |
| use TYPO3\CMS\Core\Core\Environment; | |
| use TYPO3\CMS\Core\Utility\GeneralUtility; | |
| use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; | |
| use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; | |
| /** | |
| * Font Awesome SVG ViewHelper |
| <?php | |
| namespace Namespace\MyBundle\Repository\Filters; | |
| use Doctrine\ORM\Mapping\ClassMetaData; | |
| use Doctrine\ORM\Query\Filter\SQLFilter; | |
| class DeletedFilter extends SQLFilter | |
| { | |
| public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) | |
| { |
This document describes the process of Symfony's Easy Admin Bundle, to process the given YAML configuration, with registered ConfigPass classes.
Those ConfigPasses are collections of private methods, which have e.g. action names hardcoded, so you can't reuse the "config auto-magic" for your new actions.