Put file PimcoreTinkerwellDriver.php in .tinkerwell directory
Last active
February 2, 2024 12:41
-
-
Save gander/281c0a1c6ba18651db5575d7a47916da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| php: | |
| user: 'dev:dev' | |
| build: | |
| dockerfile: .tinkerwell/Dockerfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM pimcore/pimcore:php8.2-debug-latest | |
| RUN adduser --disabled-password --gecos '' --uid 1000 dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class PimcoreTinkerwellDriver extends TinkerwellDriver | |
| { | |
| public function canBootstrap($projectPath): bool | |
| { | |
| return true; | |
| } | |
| public function bootstrap($projectPath): void | |
| { | |
| require_once $projectPath . '/vendor/autoload.php'; | |
| \Pimcore\Bootstrap::setProjectRoot(); | |
| \Pimcore\Bootstrap::bootstrap(); | |
| \Pimcore\Bootstrap::kernel(); | |
| } | |
| public function appVersion(): string | |
| { | |
| return 'Pimcore ' . \Composer\InstalledVersions::getPrettyVersion('pimcore/pimcore'); | |
| } | |
| public function getAvailableVariables(): array | |
| { | |
| return [ | |
| 'kernel' => \Pimcore::getKernel(), | |
| 'container' => \Pimcore::getKernel()?->getContainer(), | |
| ]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment