diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-18 18:56:52 +0200 | 
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-18 18:56:52 +0200 | 
| commit | ac3e0e53b2b7f118cbe4e6ee20109090ecfce3f8 (patch) | |
| tree | 941399b2e3988aa079e9d5394e9bd96d73c057c0 | |
| parent | f2500da8ec2c649ee59afd47fe99321e92a249e7 (diff) | |
| parent | 223058c8c69203c48411f14e95b1ee36226ac5c8 (diff) | |
| download | forums-ac3e0e53b2b7f118cbe4e6ee20109090ecfce3f8.tar forums-ac3e0e53b2b7f118cbe4e6ee20109090ecfce3f8.tar.gz forums-ac3e0e53b2b7f118cbe4e6ee20109090ecfce3f8.tar.bz2 forums-ac3e0e53b2b7f118cbe4e6ee20109090ecfce3f8.tar.xz forums-ac3e0e53b2b7f118cbe4e6ee20109090ecfce3f8.zip  | |
Merge pull request #2470 from bantu/task/sami
[task/sami] Add Sami to composer dependencies and build script
* bantu/task/sami:
  [task/sami] Establish alphabetical order.
  [task/sami] Also ignore ext/ directory.
  [task/sami] Replace phpdoctor with sami.
  [task/sami] Add sami/sami as a composer development dependency.
| -rw-r--r-- | build/build.xml | 10 | ||||
| -rw-r--r-- | build/phpdoc-phpbb.ini | 145 | ||||
| -rw-r--r-- | build/sami.conf.php | 50 | ||||
| -rw-r--r-- | phpBB/composer.json | 3 | ||||
| -rw-r--r-- | phpBB/composer.lock | 365 | 
5 files changed, 418 insertions, 155 deletions
diff --git a/build/build.xml b/build/build.xml index 5ea77bd9e1..6873f48fab 100644 --- a/build/build.xml +++ b/build/build.xml @@ -74,14 +74,8 @@  	</target>  	<target name="docs"> -		<!-- only works if you setup phpdoctor: -                     git clone https://github.com/peej/phpdoctor.git -                     and then create an executable phpdoctor in your path containing -                     #!/bin/sh -                     php -f /path/to/phpdoctor/phpdoc.php $@ -                --> -		<exec dir="build" -			command="phpdoctor phpdoc-phpbb.ini" +		<exec dir="." +			command="phpBB/vendor/bin/sami.php update build/sami.conf.php"  			passthru="true" />  	</target> diff --git a/build/phpdoc-phpbb.ini b/build/phpdoc-phpbb.ini deleted file mode 100644 index f1a7a4bee5..0000000000 --- a/build/phpdoc-phpbb.ini +++ /dev/null @@ -1,145 +0,0 @@ -; Default configuration file for PHPDoctor - -; This config file will cause PHPDoctor to generate API documentation of -; itself. - - -; PHPDoctor settings -; ----------------------------------------------------------------------------- - -; Names of files to parse. This can be a single filename, or a comma separated -; list of filenames. Wildcards are allowed. - -files = "*.php" - -; Names of files or directories to ignore. This can be a single filename, or a -; comma separated list of filenames. Wildcards are NOT allowed. - -;ignore = "CVS, .svn, .git, _compiled" -ignore = templates_c/,*HTML/default/*,spec/,*config.php*,*CVS/,test_chora.php,testupdate/,cache/,store/,*proSilver/,develop/,includes/utf/data/,includes/captcha/fonts/,install/update/,install/update.new/,files/,*phpinfo.php*,*update_script.php*,*upgrade.php*,*convert.php*,install/converter/,language/de/,script/,*swatch.php*,*test.php*,*test2.php*,*install.php*,*functions_diff.php*,*acp_update.php*,acm_xcache.php - -; The directory to look for files in, if not used the PHPDoctor will look in -; the current directory (the directory it is run from). - -source_path = "../phpBB/" - -; If you do not want PHPDoctor to look in each sub directory for files -; uncomment this line. - -;subdirs = off - -; Set how loud PHPDoctor is as it runs. Quiet mode suppresses all output other -; than warnings and errors. Verbose mode outputs additional messages during -; execution. - -quiet = on -;verbose = on - -; Select the doclet to use for generating output. - -doclet = standard -;doclet = debug - -; The directory to find the doclet in. Doclets control the HTML output of -; phpDoctor and can be modified to suit your needs. They are expected to be  -; in a directory named after themselves at the location given. - -;doclet_path = ./doclets - -; Select the formatter to use for generating output. - -;formatter = htmlStandardFormatter - -; The directory to find the formatter in. Formatters convert textual markup -; for use by the doclet. - -;formatter_path = ./formatters - -; The directory to find taglets in. Taglets allow you to make PHPDoctor handle -; new tags and to alter the behavour of existing tags and their output. - -;taglet_path = ./taglets - -; If the code you are parsing does not use package tags or not all elements -; have package tags, use this setting to place unbound elements into a -; particular package. - -default_package = "phpBB" - -use_class_path_as_package = off - -ignore_package_tags = off - -; Specifies the name of a HTML file containing text for the overview -; documentation to be placed on the overview page. The path is relative to -; "source_path" unless an absolute path is given. - -overview = ../README.md - -; Package comments will be looked for in a file named package.html in the same -; directory as the first source file parsed in that package or in the directory -; given below. If package comments are placed in the directory given below then -; they should be named "<packageName>.html". - -package_comment_dir = ./ - -; Parse out global variables and/or global constants? - -;globals = off -;constants = off - -; Generate documentation for all class members - -;private = on - -; Generate documentation for public and protected class members - -;protected = on - -; Generate documentation for only public class members - -;public = on - -; Use the PEAR compatible handling of the docblock first sentence - -;pear_compat = on - -; Standard doclet settings -; ----------------------------------------------------------------------------- - -; The directory to place generated documentation in. If the given path is -; relative to it will be relative to "source_path". - -d = "../build/api/" - -; Specifies the title to be placed in the HTML <title> tag. - -windowtitle = "phpBB3" - -; Specifies the title to be placed near the top of the overview summary file. - -doctitle = "phpBB3 Sourcecode Documentation" - -; Specifies the header text to be placed at the top of each output file. The -; header will be placed to the right of the upper navigation bar.  - -header = "phpBB3" - -; Specifies the footer text to be placed at the bottom of each output file. The -; footer will be placed to the right of the lower navigation bar. - -footer = "phpBB3" - -; Specifies the text to be placed at the bottom of each output file. The text -; will be placed at the bottom of the page, below the lower navigation bar. - -;bottom = "This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a>" - -; Create a class tree? - -;tree = off - -; Use GeSHi to include formatted source files in the documentation. PHPDoctor will look in the current doclet directory for a /geshi subdirectory. Unpack the GeSHi archive from http://qbnz.com/highlighter to get this directory - it will contain a php script and a subdirectory with formatting files. - -include_source = off - diff --git a/build/sami.conf.php b/build/sami.conf.php new file mode 100644 index 0000000000..dd57ec8780 --- /dev/null +++ b/build/sami.conf.php @@ -0,0 +1,50 @@ +<?php +/** +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +*/ + +// Prevent 'Class "acm" does not exist.' exception on removeClass(). +class PhpbbArrayStore extends Sami\Store\ArrayStore +{ +	public function removeClass(Sami\Project $project, $name) +	{ +		unset($this->classes[$name]); +	} +} + +$iterator = Symfony\Component\Finder\Finder::create() +	->files() +	->name('*.php') +	->in(__DIR__ . '/../phpBB/') +	->notPath('#^cache/#') +	->notPath('#^develop/#') +	->notPath('#^ext/#') +	->notPath('#^vendor/#') +	->notPath('data') +; + +$versions = Sami\Version\GitVersionCollection::create(__DIR__ . '/../') +	/* +	This would be nice, but currently causes various problems that need +	debugging. +	->addFromTags('release-3.0.*') +	->add('develop-olympus', '3.0-next (olympus)') +	->addFromTags('release-3.1.*') +	->add('develop-ascraeus', '3.1-next (ascraeus)') +	->add('develop') +	*/ +	->add('develop-olympus') +	->add('develop-ascraeus') +; + +return new Sami\Sami($iterator, array( +	'theme'                => 'enhanced', +	'versions'             => $versions, +	'title'                => 'phpBB API Documentation', +	'build_dir'            => __DIR__.'/api/output/%version%', +	'cache_dir'            => __DIR__.'/api/cache/%version%', +	'default_opened_level' => 2, +	// Do not use JsonStore. See https://github.com/fabpot/Sami/issues/79 +	'store'                => new PhpbbArrayStore, +)); diff --git a/phpBB/composer.json b/phpBB/composer.json index 434bf330ec..966ff39fcc 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -3,6 +3,7 @@  		"fabpot/goutte": "1.0.*",  		"phpunit/dbunit": "1.3.*",  		"phpunit/phpunit": "4.1.*", -		"phing/phing": "2.4.*" +		"phing/phing": "2.4.*", +		"sami/sami": "1.*"  	}  } diff --git a/phpBB/composer.lock b/phpBB/composer.lock index 6f57e67015..4dd6da46ed 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -3,7 +3,7 @@          "This file locks the dependencies of your project to a known state",          "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"      ], -    "hash": "9a505c5911182b264ea0eccffa5d5ad6", +    "hash": "78d2a648f5519c8c5370017aaeba7731",      "packages": [      ], @@ -265,6 +265,101 @@              "time": "2013-07-30 22:07:23"          },          { +            "name": "michelf/php-markdown", +            "version": "1.4.1", +            "source": { +                "type": "git", +                "url": "https://github.com/michelf/php-markdown.git", +                "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6" +            }, +            "dist": { +                "type": "zip", +                "url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", +                "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", +                "shasum": "" +            }, +            "require": { +                "php": ">=5.3.0" +            }, +            "type": "library", +            "extra": { +                "branch-alias": { +                    "dev-lib": "1.4.x-dev" +                } +            }, +            "autoload": { +                "psr-0": { +                    "Michelf": "" +                } +            }, +            "notification-url": "https://packagist.org/downloads/", +            "license": [ +                "BSD-3-Clause" +            ], +            "authors": [ +                { +                    "name": "Michel Fortin", +                    "email": "michel.fortin@michelf.ca", +                    "homepage": "http://michelf.ca/", +                    "role": "Developer" +                }, +                { +                    "name": "John Gruber", +                    "homepage": "http://daringfireball.net/" +                } +            ], +            "description": "PHP Markdown", +            "homepage": "http://michelf.ca/projects/php-markdown/", +            "keywords": [ +                "markdown" +            ], +            "time": "2014-05-05 02:43:50" +        }, +        { +            "name": "nikic/php-parser", +            "version": "v0.9.4", +            "source": { +                "type": "git", +                "url": "https://github.com/nikic/PHP-Parser.git", +                "reference": "1e5e280ae88a27effa2ae4aa2bd088494ed8594f" +            }, +            "dist": { +                "type": "zip", +                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1e5e280ae88a27effa2ae4aa2bd088494ed8594f", +                "reference": "1e5e280ae88a27effa2ae4aa2bd088494ed8594f", +                "shasum": "" +            }, +            "require": { +                "php": ">=5.2" +            }, +            "type": "library", +            "extra": { +                "branch-alias": { +                    "dev-master": "0.9-dev" +                } +            }, +            "autoload": { +                "psr-0": { +                    "PHPParser": "lib/" +                } +            }, +            "notification-url": "https://packagist.org/downloads/", +            "license": [ +                "BSD-3-Clause" +            ], +            "authors": [ +                { +                    "name": "Nikita Popov" +                } +            ], +            "description": "A PHP parser written in PHP", +            "keywords": [ +                "parser", +                "php" +            ], +            "time": "2013-08-25 17:11:40" +        }, +        {              "name": "phing/phing",              "version": "2.4.14",              "source": { @@ -755,6 +850,113 @@              "time": "2014-05-02 07:04:11"          },          { +            "name": "pimple/pimple", +            "version": "v1.0.2", +            "source": { +                "type": "git", +                "url": "https://github.com/fabpot/Pimple.git", +                "reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94" +            }, +            "dist": { +                "type": "zip", +                "url": "https://api.github.com/repos/fabpot/Pimple/zipball/ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94", +                "reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94", +                "shasum": "" +            }, +            "require": { +                "php": ">=5.3.0" +            }, +            "type": "library", +            "extra": { +                "branch-alias": { +                    "dev-master": "1.0.x-dev" +                } +            }, +            "autoload": { +                "psr-0": { +                    "Pimple": "lib/" +                } +            }, +            "notification-url": "https://packagist.org/downloads/", +            "license": [ +                "MIT" +            ], +            "authors": [ +                { +                    "name": "Fabien Potencier", +                    "email": "fabien@symfony.com", +                    "homepage": "http://fabien.potencier.org", +                    "role": "Lead Developer" +                } +            ], +            "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", +            "homepage": "http://pimple.sensiolabs.org", +            "keywords": [ +                "container", +                "dependency injection" +            ], +            "time": "2013-03-08 08:21:40" +        }, +        { +            "name": "sami/sami", +            "version": "v1.3", +            "source": { +                "type": "git", +                "url": "https://github.com/fabpot/Sami.git", +                "reference": "76f2ed80b3420f7e2f6dcd5b7218b5a5781f4110" +            }, +            "dist": { +                "type": "zip", +                "url": "https://api.github.com/repos/fabpot/Sami/zipball/76f2ed80b3420f7e2f6dcd5b7218b5a5781f4110", +                "reference": "76f2ed80b3420f7e2f6dcd5b7218b5a5781f4110", +                "shasum": "" +            }, +            "require": { +                "michelf/php-markdown": "~1.3", +                "nikic/php-parser": "0.9.*", +                "php": ">=5.3.0", +                "pimple/pimple": "1.0.*", +                "symfony/console": "~2.1", +                "symfony/filesystem": "~2.1", +                "symfony/finder": "~2.1", +                "symfony/process": "~2.1", +                "symfony/yaml": "~2.1", +                "twig/twig": "1.*" +            }, +            "bin": [ +                "sami.php" +            ], +            "type": "application", +            "extra": { +                "branch-alias": { +                    "dev-master": "1.3-dev" +                } +            }, +            "autoload": { +                "psr-0": { +                    "Sami": "." +                } +            }, +            "notification-url": "https://packagist.org/downloads/", +            "license": [ +                "MIT" +            ], +            "authors": [ +                { +                    "name": "Fabien Potencier", +                    "email": "fabien@symfony.com", +                    "homepage": "http://fabien.potencier.org", +                    "role": "Lead Developer" +                } +            ], +            "description": "Sami, an API documentation generator", +            "homepage": "http://sami.sensiolabs.org", +            "keywords": [ +                "phpdoc" +            ], +            "time": "2013-11-30 17:16:25" +        }, +        {              "name": "sebastian/comparator",              "version": "1.0.0",              "source": { @@ -1079,6 +1281,61 @@              "time": "2013-07-21 12:12:18"          },          { +            "name": "symfony/console", +            "version": "v2.4.4", +            "target-dir": "Symfony/Component/Console", +            "source": { +                "type": "git", +                "url": "https://github.com/symfony/Console.git", +                "reference": "2e452005b1e1d003d23702d227e23614679eb5ca" +            }, +            "dist": { +                "type": "zip", +                "url": "https://api.github.com/repos/symfony/Console/zipball/2e452005b1e1d003d23702d227e23614679eb5ca", +                "reference": "2e452005b1e1d003d23702d227e23614679eb5ca", +                "shasum": "" +            }, +            "require": { +                "php": ">=5.3.3" +            }, +            "require-dev": { +                "symfony/event-dispatcher": "~2.1" +            }, +            "suggest": { +                "symfony/event-dispatcher": "" +            }, +            "type": "library", +            "extra": { +                "branch-alias": { +                    "dev-master": "2.4-dev" +                } +            }, +            "autoload": { +                "psr-0": { +                    "Symfony\\Component\\Console\\": "" +                } +            }, +            "notification-url": "https://packagist.org/downloads/", +            "license": [ +                "MIT" +            ], +            "authors": [ +                { +                    "name": "Fabien Potencier", +                    "email": "fabien@symfony.com", +                    "homepage": "http://fabien.potencier.org", +                    "role": "Lead Developer" +                }, +                { +                    "name": "Symfony Community", +                    "homepage": "http://symfony.com/contributors" +                } +            ], +            "description": "Symfony Console Component", +            "homepage": "http://symfony.com", +            "time": "2014-04-27 13:34:57" +        }, +        {              "name": "symfony/css-selector",              "version": "v2.3.4",              "target-dir": "Symfony/Component/CssSelector", @@ -1243,6 +1500,55 @@              "time": "2013-07-21 12:12:18"          },          { +            "name": "symfony/filesystem", +            "version": "v2.4.4", +            "target-dir": "Symfony/Component/Filesystem", +            "source": { +                "type": "git", +                "url": "https://github.com/symfony/Filesystem.git", +                "reference": "a3af8294bcce4a7c1b2892363b0c9d8109affad4" +            }, +            "dist": { +                "type": "zip", +                "url": "https://api.github.com/repos/symfony/Filesystem/zipball/a3af8294bcce4a7c1b2892363b0c9d8109affad4", +                "reference": "a3af8294bcce4a7c1b2892363b0c9d8109affad4", +                "shasum": "" +            }, +            "require": { +                "php": ">=5.3.3" +            }, +            "type": "library", +            "extra": { +                "branch-alias": { +                    "dev-master": "2.4-dev" +                } +            }, +            "autoload": { +                "psr-0": { +                    "Symfony\\Component\\Filesystem\\": "" +                } +            }, +            "notification-url": "https://packagist.org/downloads/", +            "license": [ +                "MIT" +            ], +            "authors": [ +                { +                    "name": "Fabien Potencier", +                    "email": "fabien@symfony.com", +                    "homepage": "http://fabien.potencier.org", +                    "role": "Lead Developer" +                }, +                { +                    "name": "Symfony Community", +                    "homepage": "http://symfony.com/contributors" +                } +            ], +            "description": "Symfony Filesystem Component", +            "homepage": "http://symfony.com", +            "time": "2014-04-16 10:34:31" +        }, +        {              "name": "symfony/finder",              "version": "v2.3.4",              "target-dir": "Symfony/Component/Finder", @@ -1388,6 +1694,63 @@              "description": "Symfony Yaml Component",              "homepage": "http://symfony.com",              "time": "2014-04-18 20:37:09" +        }, +        { +            "name": "twig/twig", +            "version": "v1.15.1", +            "source": { +                "type": "git", +                "url": "https://github.com/fabpot/Twig.git", +                "reference": "1fb5784662f438d7d96a541e305e28b812e2eeed" +            }, +            "dist": { +                "type": "zip", +                "url": "https://api.github.com/repos/fabpot/Twig/zipball/1fb5784662f438d7d96a541e305e28b812e2eeed", +                "reference": "1fb5784662f438d7d96a541e305e28b812e2eeed", +                "shasum": "" +            }, +            "require": { +                "php": ">=5.2.4" +            }, +            "type": "library", +            "extra": { +                "branch-alias": { +                    "dev-master": "1.15-dev" +                } +            }, +            "autoload": { +                "psr-0": { +                    "Twig_": "lib/" +                } +            }, +            "notification-url": "https://packagist.org/downloads/", +            "license": [ +                "BSD-3-Clause" +            ], +            "authors": [ +                { +                    "name": "Fabien Potencier", +                    "email": "fabien@symfony.com", +                    "homepage": "http://fabien.potencier.org", +                    "role": "Lead Developer" +                }, +                { +                    "name": "Armin Ronacher", +                    "email": "armin.ronacher@active-4.com", +                    "role": "Project Founder" +                }, +                { +                    "name": "Twig Team", +                    "homepage": "https://github.com/fabpot/Twig/graphs/contributors", +                    "role": "Contributors" +                } +            ], +            "description": "Twig, the flexible, fast, and secure template language for PHP", +            "homepage": "http://twig.sensiolabs.org", +            "keywords": [ +                "templating" +            ], +            "time": "2014-02-13 10:19:29"          }      ],      "aliases": [  | 
