Skip to content

Commit

Permalink
Merge branch 'release/1.97.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
ktomk committed Nov 7, 2015
2 parents 0755a66 + e0764db commit 5a38bc5
Show file tree
Hide file tree
Showing 11 changed files with 203 additions and 41 deletions.
18 changes: 9 additions & 9 deletions .travis.yml
Expand Up @@ -16,12 +16,12 @@ php:
env:
- MAGENTO_VERSION="magento-mirror-1.4.2.0" DB=mysql INSTALL_SAMPLE_DATA=yes
- MAGENTO_VERSION="magento-mirror-1.5.1.0" DB=mysql INSTALL_SAMPLE_DATA=yes
- MAGENTO_VERSION="magento-ce-1.6.2.0" DB=mysql INSTALL_SAMPLE_DATA=yes
- MAGENTO_VERSION="magento-ce-1.7.0.2" DB=mysql INSTALL_SAMPLE_DATA=yes
- MAGENTO_VERSION="magento-ce-1.8.1.0" DB=mysql INSTALL_SAMPLE_DATA=yes
- MAGENTO_VERSION="magento-mirror-1.6.2.0" DB=mysql INSTALL_SAMPLE_DATA=yes
- MAGENTO_VERSION="magento-mirror-1.7.0.2" DB=mysql INSTALL_SAMPLE_DATA=yes
- MAGENTO_VERSION="magento-mirror-1.8.1.0" DB=mysql INSTALL_SAMPLE_DATA=yes
# Do not download sample data of 1.9 -> The file is too big
- MAGENTO_VERSION="magento-ce-1.9.0.1" DB=mysql INSTALL_SAMPLE_DATA=no
- MAGENTO_VERSION="magento-ce-1.9.1.1" DB=mysql INSTALL_SAMPLE_DATA=no
- MAGENTO_VERSION="magento-mirror-1.9.0.1" DB=mysql INSTALL_SAMPLE_DATA=no
- MAGENTO_VERSION="magento-mirror-1.9.1.1" DB=mysql INSTALL_SAMPLE_DATA=no
- MAGENTO_VERSION="magento-mirror-1.9.2.1" DB=mysql INSTALL_SAMPLE_DATA=no
- MAGENTO_VERSION="magento-mirror-1.9.2.2" DB=mysql INSTALL_SAMPLE_DATA=no

Expand All @@ -30,10 +30,10 @@ matrix:
exclude:
# Newer Magento versions uses newer PHP versions
- php: 5.3
env: MAGENTO_VERSION="magento-ce-1.9.0.1" DB=mysql INSTALL_SAMPLE_DATA=no
env: MAGENTO_VERSION="magento-mirror-1.9.0.1" DB=mysql INSTALL_SAMPLE_DATA=no

- php: 5.3
env: MAGENTO_VERSION="magento-ce-1.9.1.1" DB=mysql INSTALL_SAMPLE_DATA=no
env: MAGENTO_VERSION="magento-mirror-1.9.1.1" DB=mysql INSTALL_SAMPLE_DATA=no

- php: 5.3
env: MAGENTO_VERSION="magento-mirror-1.9.2.1" DB=mysql INSTALL_SAMPLE_DATA=no
Expand All @@ -49,10 +49,10 @@ matrix:
env: MAGENTO_VERSION="magento-mirror-1.5.1.0" DB=mysql INSTALL_SAMPLE_DATA=yes

- php: 5.5
env: MAGENTO_VERSION="magento-ce-1.6.2.0" DB=mysql INSTALL_SAMPLE_DATA=yes
env: MAGENTO_VERSION="magento-mirror-1.6.2.0" DB=mysql INSTALL_SAMPLE_DATA=yes

- php: 5.5
env: MAGENTO_VERSION="magento-ce-1.7.0.2" DB=mysql INSTALL_SAMPLE_DATA=no
env: MAGENTO_VERSION="magento-mirror-1.7.0.2" DB=mysql INSTALL_SAMPLE_DATA=no
include:
# Run the build script with an older PHP version
- php: 5.3
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Expand Up @@ -22,7 +22,7 @@ BUILD_STATUS=$?

php -f "n98-magerun.phar" -- --version

ls -go --full-time n98-magerun.phar
ls -l n98-magerun.phar

php -r 'echo "SHA1: ", sha1_file("n98-magerun.phar"), "\nMD5.: ", md5_file("n98-magerun.phar"), "\n";'

Expand Down
9 changes: 9 additions & 0 deletions changes.txt
Expand Up @@ -2,6 +2,15 @@
RECENT CHANGES
**************

======
1.97.7
======

* #724 Add missing versions from magento-mirror (by Fabrizio Branca)
* #722 Magento downloads are no longer working from magentocommerce.com (by Tom Klingenberg)
* #720 Add Info notice if dev:class:lookup returns a non-existent class (by Robbie Averill)
* Improve installer magento version switch argument parsing (by Tom Klingenberg)

======
1.97.6
======
Expand Down
84 changes: 69 additions & 15 deletions config.yaml
Expand Up @@ -252,34 +252,88 @@ commands:
- name: magento-mirror-1.9.2.0
version: 1.9.2.0
dist:
url: https://github.com/LokeyCoding/magento-mirror/archive/1.9.2.0.zip
url: https://github.com/OpenMage/magento-mirror/archive/1.9.2.0.zip
type: zip
shasum: 019538c04b6359ad61e4c6d2f54c835bd76f7141
extra:
sample-data: sample-data-1.9.1.0

- name: magento-mirror-1.9.1.1
version: 1.9.1.1
dist:
url: https://github.com/OpenMage/magento-mirror/archive/1.9.1.1.zip
type: zip
shasum: 3aa497d245affb273cc55851163f5133cecef650
extra:
sample-data: sample-data-1.9.1.0

- name: magento-mirror-1.9.1.0
version: 1.9.1.0
dist:
url: https://github.com/OpenMage/magento-mirror/archive/1.9.1.0.zip
type: zip
shasum: e3dcfea601ada21ce84ee4836d801dd2feeb08d1
extra:
sample-data: sample-data-1.9.1.0

- name: magento-mirror-1.9.0.1
version: 1.9.0.1
dist:
url: https://github.com/OpenMage/magento-mirror/archive/1.9.0.1.zip
type: zip
shasum: 9c87abc997957ebbf646e1a4d87d3d09e4d773f5
extra:
sample-data: sample-data-1.9.0.0

- name: magento-mirror-1.9.0.0
version: 1.9.0.0
dist:
url: https://github.com/OpenMage/magento-mirror/archive/1.9.0.0.zip
type: zip
shasum: 98dc5a70d0d12fa595032a7e4257e9a8ee8e293c
extra:
sample-data: sample-data-1.9.0.0

- name: magento-mirror-1.8.1.0
version: 1.8.1.0
dist:
url: https://github.com/OpenMage/magento-mirror/archive/1.8.1.0.zip
type: zip
shasum: 3fbff399799177e8048cc4048f66213fedd132c1
extra:
sample-data: sample-data-1.6.1.0

- name: magento-mirror-1.8.0.0
version: 1.8.0.0
dist:
url: https://github.com/OpenMage/magento-mirror/archive/1.8.0.0.zip
type: zip
shasum: 9b1dee54d0b047b66d7ad6b8ea1ff414b7773093
extra:
sample-data: sample-data-1.6.1.0

- name: magento-mirror-1.7.0.2
version: 1.7.0.2
dist:
url: https://github.com/LokeyCoding/magento-mirror/archive/1.7.0.2.tar.gz
type: tar
shasum: c10a3e15f9311c2b079bb2e71bacb32cb3192402
url: https://github.com/OpenMage/magento-mirror/archive/1.7.0.2.zip
type: zip
shasum: e7f761d1ca60d16db867e24b5219de8815d0ea25
extra:
sample-data: sample-data-1.6.1.0

- name: magento-mirror-1.6.2.0
version: 1.6.2.0
dist:
url: https://github.com/LokeyCoding/magento-mirror/archive/1.6.2.0.tar.gz
type: tar
shasum: 301b815359b8abd4dfcd828b261cd924d9868a19
url: https://github.com/OpenMage/magento-mirror/archive/1.6.2.0.zip
type: zip
shasum: db0de6d0d82427d997a206554bcd7e5874099671
extra:
sample-data: sample-data-1.6.1.0

- name: magento-mirror-1.5.1.0
version: 1.5.1.0
source:
url: git://github.com/LokeyCoding/magento-mirror.git
url: git://github.com/OpenMage/magento-mirror.git
type: git
reference: magento-1.5
extra:
Expand All @@ -288,7 +342,7 @@ commands:
- name: magento-mirror-1.4.2.0
version: 1.4.2.0
source:
url: git://github.com/LokeyCoding/magento-mirror.git
url: git://github.com/OpenMage/magento-mirror.git
type: git
reference: magento-1.4
extra:
Expand All @@ -307,30 +361,30 @@ commands:
- name: sample-data-1.9.1.0
version: 1.9.1.0
dist:
url: http://www.magentocommerce.com/downloads/assets/1.9.1.0/magento-sample-data-1.9.1.0.tar.gz
url: http://sourceforge.net/projects/mageloads/files/assets/1.9.1.0/magento-sample-data-1.9.1.0.tar.gz
type: tar
shasum: 617e0271900772ac8f11e7bb86e29fca0f640562

- name: sample-data-1.9.0.0
version: 1.9.0.0
dist:
url: http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-sample-data-1.9.0.0.tar.gz
url: http://sourceforge.net/projects/mageloads/files/assets/1.9.0.0/magento-sample-data-1.9.0.0.tar.gz
type: tar
shasum: b2b535901eb2db92a8602baf8a839ab2120c4c8f

- name: sample-data-1.6.1.0
version: 1.6.1.0
dist:
url: http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz
url: http://sourceforge.net/projects/mageloads/files/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz
type: tar
shasum: a9226bc92966855327f6eb62ff8f6c562b2113a2

- name: sample-data-1.1.2
version: 1.1.2
dist:
url: http://www.magentocommerce.com/downloads/assets/1.1.2/magento-sample-data-1.1.2.tar.bz2
type: tar
shasum: e8ddbf94698224fb71c946e789f7a23dec236384
url: http://sourceforge.net/projects/mageloads/files/assets/1.1.2/magento-sample-data-1.1.2.zip
type: zip
shasum: 6bbb57e387c59da2752fe013aadef6dcd3cd2b29

installation:
pre-check:
Expand Down
3 changes: 1 addition & 2 deletions phpunit.xml.dist
Expand Up @@ -12,8 +12,7 @@
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
strict="false">
stopOnSkipped="false">
<testsuites>
<testsuite name="n98-magerun-tests">
<directory>./tests</directory>
Expand Down
4 changes: 3 additions & 1 deletion readme.rst
Expand Up @@ -1178,6 +1178,8 @@ Resolve/Lookup Class Names
Resolves the given type and grouped class name to a class name, useful for debugging rewrites.
If the resolved class doesn't exist, an info message will be displayed.
.. code-block:: sh
$ n98-magerun.phar dev:class:lookup <block|model|helper> <name>
Expand Down Expand Up @@ -1276,7 +1278,7 @@ Rewrite List
Lists all registered class rewrites.
.. code-blocks:: sh
.. code-block:: sh
$ n98-magerun.phar dev:module:rewrite:list [--format[="..."]]
Expand Down
2 changes: 1 addition & 1 deletion src/N98/Magento/Application.php
Expand Up @@ -46,7 +46,7 @@ class Application extends BaseApplication
/**
* @var string
*/
const APP_VERSION = '1.97.6';
const APP_VERSION = '1.97.7';

/**
* @var string
Expand Down
4 changes: 4 additions & 0 deletions src/N98/Magento/Command/Developer/ClassLookupCommand.php
Expand Up @@ -39,6 +39,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($this->initMagento()) {
$resolved = $this->_getConfig()->getGroupedClassName($input->getArgument('type'), $input->getArgument('name'));
$output->writeln(ucfirst($input->getArgument('type')) . ' <comment>' . $input->getArgument('name') . "</comment> resolves to <comment>" . $resolved . '</comment>');

if (!class_exists('\\' . $resolved)) {
$output->writeln('<info>Note:</info> Class <comment>' . $resolved . '</comment> does not exist!');
}
}
}
}
48 changes: 41 additions & 7 deletions src/N98/Magento/Command/Installer/InstallCommand.php
Expand Up @@ -204,21 +204,55 @@ protected function selectMagentoVersion(InputInterface $input, OutputInterface $

if ($input->getOption('magentoVersion')) {
$type = $input->getOption('magentoVersion');
} elseif ($input->getOption('magentoVersionByName')) {
foreach ($this->commandConfig['magento-packages'] as $key => $package) {
if ($package['name'] == $input->getOption('magentoVersionByName')) {
$type = $key + 1;
break;
}
if ($type !== (string)(int)$type) {
$type = $this->getPackageNumberByName($type);
}
} elseif ($input->getOption('magentoVersionByName')) {
$type = $this->getPackageNumberByName($input->getOption('magentoVersionByName'));
}

if ($type == null) {
throw new InvalidArgumentException('Unable to locate Magento version');
}
}

$this->config['magentoVersionData'] = $this->commandConfig['magento-packages'][$type - 1];
$magentoPackages = $this->commandConfig['magento-packages'];

$index = $type - 1;
if (!isset($magentoPackages[$index])) {
throw new InvalidArgumentException(
sprintf(
'Invalid Magento package number %s, must be from 1 to %d.', var_export($type, true),
count($magentoPackages)
)
);
}

$this->config['magentoVersionData'] = $magentoPackages[$index];
}


/**
* @param $name
*
* @return int 1 or greater as the one-based package number, null on failure to resolve the name
*/
private function getPackageNumberByName($name)
{
// directly filter integer strings
if ($name === (string)(int)$name) {
return (int) $name;
}

$magentoPackages = $this->commandConfig['magento-packages'];

foreach ($magentoPackages as $key => $package) {
if ($package['name'] === $name) {
return $key + 1;
}
}

return null;
}

/**
Expand Down

0 comments on commit 5a38bc5

Please sign in to comment.