mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Compare commits
7 commits
a8e44ac471
...
3c81e0cd73
Author | SHA1 | Date | |
---|---|---|---|
|
3c81e0cd73 | ||
|
bdbd0be548 | ||
|
1b2ac50cfd | ||
|
779bec5fcf | ||
|
f512af1823 | ||
|
bbfd0385b0 | ||
|
dfcd18b9ce |
6 changed files with 54 additions and 8 deletions
1
.github/setup-exiftool.sh
vendored
1
.github/setup-exiftool.sh
vendored
|
@ -10,5 +10,4 @@
|
|||
#
|
||||
set -e
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y parallel libimage-exiftool-perl
|
||||
|
|
1
.github/setup-sphinx.sh
vendored
1
.github/setup-sphinx.sh
vendored
|
@ -11,7 +11,6 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -q -y sphinxsearch
|
||||
|
||||
DIR=$(dirname "$0")
|
||||
|
|
1
.github/setup-unbuffer.sh
vendored
1
.github/setup-unbuffer.sh
vendored
|
@ -10,5 +10,4 @@
|
|||
#
|
||||
set -e
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y expect-dev
|
||||
|
|
1
.github/setup-webserver.sh
vendored
1
.github/setup-webserver.sh
vendored
|
@ -11,7 +11,6 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nginx coreutils
|
||||
|
||||
sudo service nginx stop
|
||||
|
|
16
.github/workflows/tests.yml
vendored
16
.github/workflows/tests.yml
vendored
|
@ -28,6 +28,10 @@ jobs:
|
|||
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
|
||||
|
||||
steps:
|
||||
- name: Update Ubuntu package lists
|
||||
run: |
|
||||
sudo apt-get update -y --allow-releaseinfo-change
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
@ -169,6 +173,10 @@ jobs:
|
|||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- name: Update Ubuntu package lists
|
||||
run: |
|
||||
sudo apt-get update -y --allow-releaseinfo-change
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
@ -308,6 +316,10 @@ jobs:
|
|||
- 6379:6379
|
||||
|
||||
steps:
|
||||
- name: Update Ubuntu package lists
|
||||
run: |
|
||||
sudo apt-get update -y --allow-releaseinfo-change
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
@ -412,6 +424,10 @@ jobs:
|
|||
|
||||
|
||||
steps:
|
||||
- name: Update Ubuntu package lists
|
||||
run: |
|
||||
sudo apt-get update -y --allow-releaseinfo-change
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
|
|
@ -73,30 +73,38 @@ class extension_base extends Extension
|
|||
{
|
||||
$services_directory = false;
|
||||
$services_file = false;
|
||||
$additional_services_files = array();
|
||||
|
||||
if (file_exists($this->ext_path . 'config/' . $container->getParameter('core.environment') . '/container/environment.yml'))
|
||||
{
|
||||
$services_directory = $this->ext_path . 'config/' . $container->getParameter('core.environment') . '/container/';
|
||||
$services_directory = 'config/' . $container->getParameter('core.environment') . '/container';
|
||||
$services_file = 'environment.yml';
|
||||
}
|
||||
else if (!is_dir($this->ext_path . 'config/' . $container->getParameter('core.environment')))
|
||||
{
|
||||
if (file_exists($this->ext_path . 'config/default/container/environment.yml'))
|
||||
{
|
||||
$services_directory = $this->ext_path . 'config/default/container/';
|
||||
$services_directory = 'config/default/container';
|
||||
$services_file = 'environment.yml';
|
||||
}
|
||||
else if (!is_dir($this->ext_path . 'config/default') && file_exists($this->ext_path . '/config/services.yml'))
|
||||
{
|
||||
$services_directory = $this->ext_path . 'config';
|
||||
$services_directory = 'config';
|
||||
$services_file = 'services.yml';
|
||||
}
|
||||
}
|
||||
|
||||
if ($services_directory && $services_file)
|
||||
{
|
||||
$loader = new YamlFileLoader($container, new FileLocator(filesystem_helper::realpath($services_directory)));
|
||||
$loader = new YamlFileLoader($container, new FileLocator(filesystem_helper::realpath($this->ext_path . $services_directory)));
|
||||
$loader->load($services_file);
|
||||
|
||||
// Load additional services located in service_ prefixed Yaml files if any
|
||||
$additional_services_files = $this->getServicesFilenames($services_directory, 'services_');
|
||||
foreach ($additional_services_files as $file)
|
||||
{
|
||||
$loader->load($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,4 +144,30 @@ class extension_base extends Extension
|
|||
{
|
||||
return str_replace('/', '_', $this->extension_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the array of the Yaml filenames.
|
||||
*
|
||||
* @param string $services_directory Directory in the extension folder containing services files
|
||||
* @param string $services_file_prefix Services files prefix to look for
|
||||
*
|
||||
* @return array The services filenames array
|
||||
*/
|
||||
public function getServicesFilenames($services_directory, $services_file_prefix = '')
|
||||
{
|
||||
$services_files = array();
|
||||
$finder = new \Symfony\Component\Finder\Finder();
|
||||
$finder
|
||||
->name("{$services_file_prefix}*.yml")
|
||||
->path($services_directory)
|
||||
->files()
|
||||
->in($this->ext_path);
|
||||
|
||||
foreach ($finder as $file)
|
||||
{
|
||||
$services_files[] = $file->getBasename();
|
||||
}
|
||||
|
||||
return $services_files;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue