Skip to content

Commit 25a7043

Browse files
committed
Bootstrap tings
1 parent fb40286 commit 25a7043

20 files changed

+464
-181
lines changed

code-block-checker.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env php
2+
3+
<?php
4+
5+
require __DIR__.'/vendor/autoload.php';
6+
7+
use SymfonyCodeBlockChecker\Application;
8+
use SymfonyCodeBlockChecker\Kernel;
9+
use Symfony\Component\Console\Input\ArgvInput;
10+
11+
$input = new ArgvInput();
12+
if (null === $config = $input->getParameterOption(['--config', '-c'], null, true)) {
13+
$config = getcwd();
14+
}
15+
16+
if (null === $env = $input->getParameterOption(['--env', '-e'], null, true)) {
17+
$env = 'prod';
18+
}
19+
20+
putenv('APP_CONFIG_FILE='.$config);
21+
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
22+
23+
$kernel = new Kernel($_SERVER['APP_ENV']);
24+
$application = new Application($kernel);
25+
$application->run($input);

composer.json

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
{
2+
"name": "nyholm/symfony-code-block-checker",
23
"type": "project",
34
"license": "proprietary",
4-
"minimum-stability": "dev",
5-
"prefer-stable": true,
65
"require": {
7-
"php": ">=7.2.5",
6+
"php": ">=8.0",
87
"ext-ctype": "*",
98
"ext-iconv": "*",
10-
"symfony/console": "5.2.*",
11-
"symfony/dotenv": "5.2.*",
9+
"symfony/console": "^5.2",
10+
"symfony/dotenv": "^5.2",
11+
"symfony/event-dispatcher": "^5.2",
1212
"symfony/flex": "^1.3.1",
13-
"symfony/framework-bundle": "5.2.*",
14-
"symfony/yaml": "5.2.*"
15-
},
16-
"require-dev": {
13+
"symfony/framework-bundle": "^5.2",
14+
"symfony/yaml": "^5.2"
1715
},
1816
"config": {
1917
"optimize-autoloader": true,
@@ -24,38 +22,21 @@
2422
},
2523
"autoload": {
2624
"psr-4": {
27-
"App\\": "src/"
25+
"SymfonyCodeBlockChecker\\": "src/"
2826
}
2927
},
3028
"autoload-dev": {
3129
"psr-4": {
32-
"App\\Tests\\": "tests/"
30+
"SymfonyCodeBlockChecker\\Tests\\": "tests/"
3331
}
3432
},
3533
"replace": {
3634
"symfony/polyfill-ctype": "*",
37-
"symfony/polyfill-iconv": "*",
38-
"symfony/polyfill-php72": "*"
39-
},
40-
"scripts": {
41-
"auto-scripts": {
42-
"cache:clear": "symfony-cmd",
43-
"assets:install %PUBLIC_DIR%": "symfony-cmd"
44-
},
45-
"post-install-cmd": [
46-
"@auto-scripts"
47-
],
48-
"post-update-cmd": [
49-
"@auto-scripts"
50-
]
51-
},
52-
"conflict": {
53-
"symfony/symfony": "*"
35+
"symfony/polyfill-iconv": "*"
5436
},
5537
"extra": {
5638
"symfony": {
57-
"allow-contrib": false,
58-
"require": "5.2.*"
39+
"allow-contrib": false
5940
}
6041
}
6142
}

composer.lock

Lines changed: 20 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/bundles.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

config/packages/cache.yaml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
framework:
2-
cache:
3-
# Unique name of your app: used to compute stable namespaces for cache keys.
4-
#prefix_seed: your_vendor_name/app_name
1+
services:
2+
Symfony\Contracts\Cache\CacheInterface: '@cache.filesystem'
53

6-
# The "app" cache stores to the filesystem by default.
7-
# The data in this cache should persist between deploys.
8-
# Other options include:
4+
cache.filesystem:
5+
class: Symfony\Component\Cache\Adapter\FilesystemAdapter
6+
arguments:
7+
- 'symfony-code-block-checker'
8+
- 0
9+
- '%kernel.project_dir%/var/storage'
910

10-
# Redis
11-
#app: cache.adapter.redis
12-
#default_redis_provider: redis://localhost
13-
14-
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
15-
#app: cache.adapter.apcu
16-
17-
# Namespaced pools use the above "app" backend by default
18-
#pools:
19-
#my.dedicated.cache: null

config/packages/framework.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

config/packages/prod/routing.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

config/packages/routing.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

config/packages/symfony.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
services:
2+
Symfony\Contracts\EventDispatcher\EventDispatcherInterface:
3+
alias: 'Symfony\Component\EventDispatcher\EventDispatcher'
4+
public: true
5+
6+
Symfony\Component\EventDispatcher\EventDispatcher: ~

config/packages/test/framework.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)