git init --bare --shared=0700
git reset --hard HEAD~1
<?php | |
/** | |
* Demo ReactPHP application using Twig in yielding mode with an async function. | |
*/ | |
namespace App; | |
use Exception; | |
use Psr\Http\Message\ServerRequestInterface; |
<?php | |
namespace App; | |
use Revolt\EventLoop; | |
use Symfony\Contracts\HttpClient\HttpClientInterface; | |
class RevoltHttpClient | |
{ | |
private int $requests = 0; |
#!/usr/bin/env php | |
<?php | |
$pwd = getcwd(); | |
$args = $_SERVER['argv']; | |
if (count($args) !== 2) { | |
echo "Replace any composer package from a project with a symlink to an external directory.\n"; | |
echo "Usage: composer-link <path-to-package>\n"; | |
exit(1); |
<?php | |
namespace Tests\Integration; | |
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; | |
use Symfony\Component\HttpKernel\HttpKernelInterface; | |
use Symfony\Component\Routing\RouterInterface; |
<?php | |
use Symfony\Component\HttpFoundation\ChainRequestMatcher; | |
use Symfony\Component\HttpFoundation\RequestMatcher; | |
use Symfony\Component\HttpFoundation\RequestMatcherInterface; | |
class RequestMatcherFactory | |
{ | |
public function getRequestMatcher(array $config): RequestMatcherInterface | |
{ |
<?php | |
namespace App; | |
class Foo | |
{ | |
} | |
class Bar | |
{ |
build: | |
image: node:alpine | |
script: | |
# Skip build if files are already in cache | |
- .gitlab-ci/git-tree-changed.sh .gitlab-cache-key '\.(css|js|json)$' ./frontend ./other-frontend-dir ./public/yet-another || (cd ./frontend && npm ci && npm run build) | |
variables: | |
# $CACHE_KEY_INDEX is set in project variable, and must be updated each time the CI cache is clear | |
# Waiting for the issue to be fixed: https://gitlab.com/gitlab-org/gitlab/-/issues/360438#note_923272903 | |
CACHE_FALLBACK_KEY: ${CI_DEFAULT_BRANCH}-build-${CACHE_KEY_INDEX} | |
cache: |
<?php | |
namespace PMD\ONE\CoreBundle\Lock\Store; | |
use Doctrine\DBAL\Connection; | |
use Symfony\Component\Lock\Exception\InvalidArgumentException; | |
use Symfony\Component\Lock\Exception\LockConflictedException; | |
use Symfony\Component\Lock\Key; | |
use Symfony\Component\Lock\PersistingStoreInterface; |
<?php | |
namespace Testing; | |
/** | |
* Authentication on a Vault server using AWS IAM | |
* https://www.vaultproject.io/api-docs/auth/aws#login | |
*/ | |
use AsyncAws\Core\AwsClientFactory; |