mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-02-02 11:58:26 +00:00
Use a Composer autoloader (Fix #183)
This commit is contained in:
parent
127d5269c0
commit
a0aec1450b
@ -17,8 +17,8 @@ if (!JFactory::getUser()->authorise('core.manage', 'com_patchtester'))
|
||||
// Application reference
|
||||
$app = JFactory::getApplication();
|
||||
|
||||
// Register the component namespace to the autoloader
|
||||
JLoader::registerNamespace('PatchTester', __DIR__);
|
||||
// Import our Composer autoloader to load the component classes
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
// Build the controller class name based on task
|
||||
$task = $app->input->getCmd('task', 'display');
|
||||
|
@ -44,6 +44,7 @@
|
||||
<folder>backups</folder>
|
||||
<folder>install</folder>
|
||||
<folder>language</folder>
|
||||
<folder>vendor</folder>
|
||||
<filename>access.xml</filename>
|
||||
<filename>config.xml</filename>
|
||||
<filename>patchtester.php</filename>
|
||||
|
@ -1,16 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd ../../
|
||||
rm -rf packaging && mkdir packaging
|
||||
rm -rf packages && mkdir packages
|
||||
composer install --no-dev
|
||||
cp -r administrator/components/com_patchtester packaging/admin
|
||||
cp -r administrator/templates/hathor/html/com_patchtester packaging/hathor
|
||||
cp -r media/com_patchtester packaging/media
|
||||
rm -rf packaging/admin/backups/*.txt
|
||||
mv packaging/admin/patchtester.xml packaging/patchtester.xml
|
||||
mv packaging/admin/script.php packaging/script.php
|
||||
cd packaging
|
||||
tar jcf packages/com_patchtester.tar.bz2 admin/ hathor/ media/ patchtester.xml script.php
|
||||
tar zcf packages/com_patchtester.tar.gz admin/ hathor/ media/ patchtester.xml script.php
|
||||
zip -r packages/com_patchtester.zip admin/ hathor/ media/ patchtester.xml script.php
|
||||
rm -rf build/packaging && mkdir build/packaging
|
||||
rm -rf build/packages && mkdir build/packages
|
||||
composer install --no-dev -o
|
||||
cp -r administrator/components/com_patchtester build/packaging/admin
|
||||
cp -r administrator/templates/hathor/html/com_patchtester build/packaging/hathor
|
||||
cp -r media/com_patchtester build/packaging/media
|
||||
rm -rf build/packaging/admin/backups/*.txt
|
||||
mv build/packaging/admin/patchtester.xml build/packaging/patchtester.xml
|
||||
mv build/packaging/admin/script.php build/packaging/script.php
|
||||
cd build/packaging
|
||||
tar jcf ../packages/com_patchtester.tar.bz2 .
|
||||
tar zcf ../packages/com_patchtester.tar.gz .
|
||||
zip -r ../packages/com_patchtester.zip .
|
||||
cd ../../
|
||||
composer install
|
||||
|
@ -14,5 +14,10 @@
|
||||
"require-dev": {
|
||||
"joomla/crowdin-sync": "dev-master",
|
||||
"squizlabs/php_codesniffer": "~1.5"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PatchTester\\": "administrator/components/com_patchtester/PatchTester/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
composer.lock
generated
2
composer.lock
generated
@ -395,7 +395,7 @@
|
||||
"crowdin",
|
||||
"joomla"
|
||||
],
|
||||
"time": "2016-10-31T22:30:19+00:00"
|
||||
"time": "2016-10-31 22:30:19"
|
||||
},
|
||||
{
|
||||
"name": "joomla/filter",
|
||||
|
Loading…
x
Reference in New Issue
Block a user