-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only a small change was needed for the LargeObject usage. Otherwise it restructures the project in line with our other packages.
- Loading branch information
Showing
19 changed files
with
344 additions
and
211 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
/bin/vendorbin export-ignore | ||
/build export-ignore | ||
/tests export-ignore | ||
/tools export-ignore | ||
/examples export-ignore | ||
/docker export-ignore | ||
/vendor-bin export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/captainhook.json export-ignore | ||
/phpstan.neon export-ignore | ||
/phpstan-baseline.neon export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/psalm.xml export-ignore | ||
/psalm-baseline.xml export-ignore | ||
/ruleset.xml export-ignore | ||
/.travis.yml export-ignore |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
error_reporting(E_ALL); // Report everything, even notices | ||
set_time_limit(0); // No time limit for console commands | ||
|
||
$projectDir = dirname(__DIR__); | ||
|
||
$composerRunType = $_SERVER['argv'][1] ?? 'outdated'; | ||
|
||
require $projectDir.'/vendor/autoload.php'; | ||
|
||
$sourceFinder = new \Symfony\Component\Finder\Finder(); | ||
$sourceFinder->in($projectDir . '/vendor-bin')->directories()->depth(0)->sortByName(); | ||
|
||
/** @var array<string, \Symfony\Component\Process\Process> $tools */ | ||
$tools = []; | ||
|
||
foreach ($sourceFinder as $directory) { | ||
$toolName = $directory->getFilename(); | ||
|
||
$options = [ | ||
'--ansi', | ||
]; | ||
|
||
if ($composerRunType === 'update') { | ||
$options[] = '--no-progress'; | ||
} | ||
|
||
$process = new \Symfony\Component\Process\Process(['composer', $composerRunType, ...$options]); | ||
if (isset($_SERVER['COMPOSER_CACHE_DIR'])) { | ||
$process->setEnv(['COMPOSER_CACHE_DIR' => $_SERVER['COMPOSER_CACHE_DIR']]); | ||
} | ||
$process->setWorkingDirectory($projectDir . '/vendor-bin/' . $toolName); | ||
$process->start(); | ||
$process->wait(); | ||
|
||
echo 'Running composer ' . $composerRunType . ' for ' . $toolName . ' ...' . "\n"; | ||
|
||
$processOutput = \trim($process->getOutput()); | ||
|
||
if ($composerRunType === 'update') { | ||
$processOutput = \trim($processOutput . "\n" . $process->getErrorOutput()); | ||
} | ||
|
||
if (\strlen($processOutput) > 0) { | ||
echo $processOutput . "\n"; | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
services: | ||
composer: | ||
image: thecodingmachine/php:8.2-v4-cli | ||
container_name: squirrel_composer | ||
working_dir: /usr/src/app | ||
command: [ "composer", "${COMPOSER_COMMAND}", "--ansi" ] | ||
logging: | ||
driver: "none" | ||
volumes: | ||
- .:/usr/src/app | ||
- "$HOME/.cache/composer:/tmp/composer_cache" | ||
environment: | ||
COMPOSER_CACHE_DIR: "/tmp/composer_cache" | ||
COMPOSER_ROOT_VERSION: 'dev-master' | ||
# Basic config for CLI commands | ||
PHP_INI_ERROR_REPORTING: "E_ALL" | ||
PHP_INI_MEMORY_LIMIT: "1g" | ||
PHP_INI_MAX_EXECUTION_TIME: 3600 | ||
# Enable Opcache + JIT | ||
PHP_INI_OPCACHE__ENABLE_CLI: 1 | ||
PHP_INI_OPCACHE__MEMORY_CONSUMPTION: 256 | ||
PHP_INI_OPCACHE__VALIDATE_TIMESTAMPS: 0 | ||
PHP_INI_JIT_BUFFER_SIZE: "256m" | ||
# For code coverage | ||
PHP_EXTENSION_XDEBUG: 1 | ||
XDEBUG_MODE: coverage |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# Get directory of this script | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
COMPOSER_COMMAND="$@" docker compose -f "$DIR/compose/composer.yml" --project-directory "$DIR/.." --project-name=squirrel_composer up --abort-on-container-exit --exit-code-from=composer --no-log-prefix composer 2>&1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.