Skip to content
This repository has been archived by the owner on May 4, 2020. It is now read-only.

Extensions frontend [WIP] #41

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
f4cf842
Mark multiple stable extensions scenario as critical
everzet Mar 15, 2015
55b4ecf
Generate ExtensionBundle
everzet Mar 15, 2015
d931b83
Implement extension listing controller
everzet Mar 15, 2015
baebdc6
Define extension.catalogue service
everzet Mar 15, 2015
dc60db0
Add extensions template
everzet Mar 15, 2015
f92726c
Merge branch 'master' into feature/extensions-frontend
everzet Mar 16, 2015
4187c86
Fix Extension bundle to be inline with master changes
everzet Mar 16, 2015
2553e85
Add ExtensionCataloguer to the list of package listeners
everzet Mar 16, 2015
2029a21
Implement extraction of non-composer package
everzet Mar 16, 2015
fc2d55c
Implement extraction of non-extension composer package
everzet Mar 16, 2015
344ad11
Implement extensions list page
everzet Mar 17, 2015
4c2d35a
Fix documentation integration tests
everzet Mar 17, 2015
3436abd
Merge branch 'master' into feature/extensions-frontend
everzet Mar 17, 2015
621dc9f
Fix the ExtensionCataloguer namespace
everzet Mar 17, 2015
e248cfa
Merge branch 'master' into feature/extensions-frontend
everzet Mar 17, 2015
c603349
Move Extension bundle under Integration
everzet Mar 17, 2015
a05b973
Merge branch 'master' into feature/extensions-frontend
everzet Mar 17, 2015
50fc781
Change Extension interface into the VO
everzet Mar 22, 2015
ed1ae11
Merge branch 'master' into feature/extensions-frontend
everzet Mar 22, 2015
ca3e0ff
Fetch extension description and author from Composer
everzet Mar 29, 2015
d0ac068
Keep extensions folder
everzet Mar 30, 2015
39ca4f5
Merge branch 'master' into feature/extensions-frontend
everzet Mar 30, 2015
cfcad25
Fix broken service definition
everzet Mar 30, 2015
ec779eb
Move page path composition responsibility to Page
everzet Apr 21, 2015
9aff96f
Make PublishedDocumentation::has() private
everzet Apr 21, 2015
06ace8b
Cleanup internal API of Page
everzet Apr 21, 2015
badb985
Fix the wording of documentation_meta feature
everzet Apr 21, 2015
381b191
Remove unused property
everzet Apr 21, 2015
c456ea1
Rename BuiltDocumentation::buildPath() to path()
everzet Apr 21, 2015
00afc61
Mark multiple stable extensions scenario as critical
everzet Mar 15, 2015
5674c55
Generate ExtensionBundle
everzet Mar 15, 2015
e4fff58
Implement extension listing controller
everzet Mar 15, 2015
118b01a
Define extension.catalogue service
everzet Mar 15, 2015
110d1a9
Add extensions template
everzet Mar 15, 2015
b290e95
Fix Extension bundle to be inline with master changes
everzet Mar 16, 2015
ea21135
Add ExtensionCataloguer to the list of package listeners
everzet Mar 16, 2015
35911d8
Implement extraction of non-composer package
everzet Mar 16, 2015
a0c5cf5
Implement extraction of non-extension composer package
everzet Mar 16, 2015
cf0b978
Implement extensions list page
everzet Mar 17, 2015
e963228
Fix the ExtensionCataloguer namespace
everzet Mar 17, 2015
252bc79
Move Extension bundle under Integration
everzet Mar 17, 2015
7580c09
Change Extension interface into the VO
everzet Mar 22, 2015
665f8cd
Fetch extension description and author from Composer
everzet Mar 29, 2015
d31977a
Keep extensions folder
everzet Mar 30, 2015
cf15a53
Fix broken service definition
everzet Mar 30, 2015
29c36b8
Fix broken DirectoryPublisher test
everzet Aug 1, 2015
0663a67
Update dependencies
everzet Aug 1, 2015
0b208ec
Merge branch 'feature/extensions-frontend' of github.com:everzet/Borg…
everzet Aug 1, 2015
39c8c04
Add navigation link for Extensions page
everzet Aug 1, 2015
ecc6052
Move extension list template to the bundle root
everzet Aug 1, 2015
184e947
Style the extensions list page
everzet Aug 2, 2015
b9d0a9e
Properly trim the long extension names w/ CSS
everzet Aug 2, 2015
70eef80
Add page title to the extensions page
everzet Aug 2, 2015
c2dfe0e
Move all artifacts under build/ folder
everzet Aug 3, 2015
f5887a9
Properly handle invalid composer authors sections
everzet Aug 3, 2015
4421394
Properly handle cases where package type is not provided
everzet Aug 3, 2015
7ae0028
Rename and simplify ComposerAuthor
everzet Aug 4, 2015
611ab93
Align rules in features for symmetry
everzet Aug 11, 2015
e04ecc2
Cleanup the borg paths config
everzet Aug 11, 2015
aa1195f
Make sure that cache is cleaned between scenarios
everzet Aug 11, 2015
c21e63e
Mark releasing a stable extension scenario critical
everzet Aug 11, 2015
4278c02
Generate step definition for missing step
everzet Aug 11, 2015
57f149c
Write failing test for the pending step
everzet Aug 11, 2015
e541545
Introduce individual extension page
everzet Aug 11, 2015
4083d00
Style the extension page
everzet Aug 11, 2015
0c702e7
Abstract documentation URL generation into private
everzet Aug 11, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
vendor/
web/bundles/
extensions/*
docs/*
app/cache/*
app/logs/*
build/repositories/*
build/docs/*
!app/cache/.gitkeep
!app/logs/.gitkeep
!extensions/.gitkeep
!build/repositories/.gitkeep
!build/docs/.gitkeep
!docs/.gitkeep
Expand Down
1 change: 1 addition & 0 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public function registerBundles()
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Behat\Borg\Integration\Symfony\Release\ReleaseBundle(),
new Behat\Borg\Integration\Symfony\Documentation\DocumentationBundle(),
new Behat\Borg\Integration\Symfony\Extension\ExtensionBundle(),
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
Expand Down
3 changes: 3 additions & 0 deletions app/Resources/views/layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<a class="section {% if app.request.attributes.get('section') == 'documentation' %}active{% endif %}" href="{{ path('behat_documentation_page', {'version': 'current', 'path': 'index.html'}) }}">
Documentation
</a>
<a class="section {% if app.request.attributes.get('section') == 'extension' %}active{% endif %}" href="{{ path('extension_list') }}">
Extensions
</a>
<a class="fork-us" href="https://github.com/Behat/Behat">Fork us</a>
</nav>
</div>
Expand Down
55 changes: 37 additions & 18 deletions app/SymfonyRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getTestMessage()
}

/**
* Returns the help text for resolving the problem
* Returns the help text for resolving the problem.
*
* @return string The help text
*/
Expand Down Expand Up @@ -119,10 +119,10 @@ class PhpIniRequirement extends Requirement
*
* @param string $cfgName The configuration name used for ini_get()
* @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false,
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived)
* @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived)
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
Expand Down Expand Up @@ -221,10 +221,10 @@ public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText
*
* @param string $cfgName The configuration name used for ini_get()
* @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false,
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived)
* @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived)
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
Expand All @@ -239,10 +239,10 @@ public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence =
*
* @param string $cfgName The configuration name used for ini_get()
* @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false,
or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
* @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
* Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
* @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived)
* @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived)
* @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
Expand Down Expand Up @@ -542,11 +542,22 @@ function_exists('simplexml_import_dom'),

/* optional recommendations follow */

$this->addRecommendation(
file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'),
'Requirements file should be up-to-date',
'Your requirements file is outdated. Run composer install and re-check your configuration.'
);
if (file_exists(__DIR__.'/../vendor/composer')) {
require_once __DIR__.'/../vendor/autoload.php';

try {
$r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle');

$contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php');
} catch (\ReflectionException $e) {
$contents = '';
}
$this->addRecommendation(
file_get_contents(__FILE__) === $contents,
'Requirements file should be up-to-date',
'Your requirements file is outdated. Run composer install and re-check your configuration.'
);
}

$this->addRecommendation(
version_compare($installedPhpVersion, '5.3.4', '>='),
Expand Down Expand Up @@ -632,15 +643,15 @@ class_exists('Locale'),
'Install and enable the <strong>intl</strong> extension (used for validators).'
);

if (class_exists('Collator')) {
if (extension_loaded('intl')) {
// in some WAMP server installations, new Collator() returns null
$this->addRecommendation(
null !== new Collator('fr_FR'),
'intl extension should be correctly configured',
'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.'
);
}

if (class_exists('Locale')) {
// check for compatible ICU versions (only done when you have the intl extension)
if (defined('INTL_ICU_VERSION')) {
$version = INTL_ICU_VERSION;
} else {
Expand All @@ -659,6 +670,14 @@ class_exists('Locale'),
'intl ICU version should be at least 4+',
'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).'
);

$this->addPhpIniRecommendation(
'intl.error_level',
create_function('$cfgValue', 'return (int) $cfgValue === 0;'),
true,
'intl.error_level should be 0 in php.ini',
'Set "<strong>intl.error_level</strong>" to "<strong>0</strong>" in php.ini<a href="#phpini">*</a> to inhibit the messages when an error occurs in ICU functions.'
);
}

$accelerator =
Expand Down
1 change: 1 addition & 0 deletions app/config/config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ parameters:
package.release_downloader.path: %kernel.cache_dir%/build/repositories
documentation.build.path: %kernel.cache_dir%/build/docs
documentation.publisher.path: %kernel.cache_dir%/docs
extension.repo.path: %kernel.cache_dir%/extensions
7 changes: 7 additions & 0 deletions app/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ homepage:
template: '::homepage.html.twig'
section: 'homepage'

extension:
resource: "@ExtensionBundle/Controller/"
type: annotation
prefix: /extensions
defaults:
section: 'extension'

documentation:
resource: '@DocumentationBundle/Controller/'
type: annotation
Expand Down
Loading