Przeglądaj źródła

Update packagist about pages

Jordi Boggiano 13 lat temu
rodzic
commit
961190c8dd

+ 0 - 9
src/Packagist/WebBundle/Controller/AboutController.php

@@ -30,13 +30,4 @@ class AboutController extends Controller
     {
         return array();
     }
-
-    /**
-     * @Template()
-     * @Route("/about-composer", name="about.composer")
-     */
-    public function aboutComposerAction()
-    {
-        return array();
-    }
 }

+ 7 - 4
src/Packagist/WebBundle/Resources/views/About/about.html.twig

@@ -3,7 +3,7 @@
 {% block content %}
     <div class="box clearfix">
         <h1>What is Packagist?</h1>
-        <p>Packagist is a Composer package repository. It lets you find packages you want, and lets Composer know where to get the code from. You can use Composer to manage your project or libraries' dependencies - read more about it on the <a href="{{ path('about.composer') }}">Composer page</a>.</p>
+        <p>Packagist is a Composer package repository. It lets you find packages and lets Composer know where to get the code from. You can use Composer to manage your project or libraries' dependencies - read more about it on the <a href="http://getcomposer.org/">Composer website</a>.</p>
         <p>You can find the packagist.org source on <a href="https://github.com/composer/packagist">GitHub</a>.
 
         <h1>How to submit packages?</h1>
@@ -76,12 +76,15 @@ v2.0.4-p1
 
         <h1>Update Schedule</h1>
 
-        <p>New packages will be crawled <strong>within ten minutes</strong>.</p>
+        <p>New packages will be crawled <strong>within ten minutes</strong> unless you add the GitHub service hook. To do so you can go to your GitHub repository, click the "Admin" button, then "Service Hooks". Pick Packagist in the list, and add the API key you will find on your <a href="{{ path('fos_user_profile_show') }}">profile</a>, plus your Packagist username if it's not the same as on GitHub.</p>
 
-        <p>Existing packages will be crawled <strong>every hour</strong>.</p>
+        <p>Existing packages will be crawled <strong>every hour</strong>. When the GitHub is enabled packages are only crawled once a week unless the GitHub hook triggers crawling. You can also trigger a manual build on your package page if you are logged-in.</p>
 
         <p>The search index is updated <strong>every five minutes</strong>. It will index (or reindex) any package that has been crawled since the last time the search indexer ran.</p>
 
-        <p>Crawling cannot currently be triggered on commit or by other means. This is planned for a future release.</p>
+        <h1>Community</h1>
+
+        <p>If you have questions about composer or want to help out, come and join us in the <em><a href="irc://irc.freenode.net/#composer-dev">#composer-dev</a></em> channel on irc.freenode.net.</p>
+        <p>Also join the <em><a href="http://groups.google.com/group/composer-dev">composer-dev mailing list</a></em>.</p>
     </div>
 {% endblock %}

+ 0 - 124
src/Packagist/WebBundle/Resources/views/About/aboutComposer.html.twig

@@ -1,124 +0,0 @@
-{% extends "PackagistWebBundle::layout.html.twig" %}
-
-{% block content %}
-    <div class="box clearfix">
-        <h1>What is Composer?</h1>
-        <p>Composer helps you manage your project or libraries' dependencies. You can find the Composer source on <a href="https://github.com/composer/composer">GitHub</a>.</p>
-
-        <h1>Declaring dependencies</h1>
-        <p>To define your project's dependencies, you can use a composer.json file, just like in a library or plugin, but you don't have to specify most of the fields.</p>
-        <p>A typical composer.json file for a project looks like this:</p>
-<pre>
-{
-    "name": "my-project",
-    "version": "1.0.0",
-    "require": {
-        "monolog/monolog": "1.0.0"
-    }
-}
-</pre>
-        <p>In this example, the project only requires the Monolog library as a dependency.</p>
-
-        <h2>Adding more package repositories</h2>
-        <p>You can add different repositories than Packagist, if needed, by specifying them by hand. They all sit in the "repositories" key, and each are made of a name (which is only for your use, for self-documenting purposes), a type, and then a configuration.</p>
-
-        <h2>Adding another Composer repository</h2>
-        <p>Packagist is a Composer repository, it contains a list of all packages under <em>/packages.json</em>. You can set one up for your own use, you will find the sources on <a href="https://github.com/composer/packagist">GitHub</a>. You can set it up in Composer like this:
-<pre>
-{
-    "repositories": [
-        {
-            "type": "composer",
-            "url": "http://example.org"
-        }
-    ]
-}
-</pre>
-
-        <h2>Removing the default Packagist repository</h2>
-        <p>If you do not wish to work with Packagist.org packages, you can disable it like that:</p>
-<pre>
-{
-    "repositories": [
-        {
-            "packagist": false
-        }
-    ]
-}
-</pre>
-        <p>Of course if you do that you should define an alternative repository or Composer will be pretty useless.</p>
-
-        <h2>Adding a git repository containing a composer package</h2>
-        <p>VCS (only Git so far) repositories can be used as repositories if they contain a composer.json, even if the packages are not available on Packagist. They could also be private repositories that you don't want to make accessible to everyone. Here's how to do it:</p>
-<pre>
-{
-    "name": "my-project",
-    "version": "1.0.0",
-    "repositories": [
-        {
-            "type": "vcs",
-            "url": "git://example.org/MyRepo.git"
-        }
-    ],
-    "require": {
-        "monolog/monolog": "1.0.0",
-        "myvendor/mypackage": ">=1.0.0"
-    }
-}
-</pre>
-
-        <h2>Adding code that does not support composer</h2>
-        <p>If you wish to use a repository that does not contain composer.json as a dependency, you can define its package information inline with the package repository, for example:</p>
-<pre>
-{
-    "repositories": [
-        {
-            "type": "package",
-            "package": {
-                "name": "vendor/package",
-                "version": "1.0.0",
-                "dist": {
-                    "url": "http://example.org/package.zip",
-                    "type": "zip"
-                },
-                "source": {
-                    "url": "git://example.org/package.git",
-                    "type": "git",
-                    "reference": "tag name, branch name or commit hash"
-                }
-            }
-        }
-    ],
-    "require": {
-        "vendor/package": "1.0.0"
-    }
-}
-</pre>
-        <p>You only have to specify one of the two dist/source keys, but specifying both makes it more flexible.</p>
-
-        <h2>Adding PEAR packages</h2>
-        <p>If a library does not have a composer package but offers PEAR packages, you can also add it to composer. You just need to specify its PEAR channel and all the channels of its dependencies:</p>
-<pre>
-{
-    "repositories": [
-        {
-            "type": "pear",
-            "url": "http://pear.example.org"
-        },
-        {
-            "type": "pear",
-            "url": "http://pear.example.com"
-        }
-    ],
-    "require": {
-        "SomePackage": "1.0.0"
-    }
-}
-</pre>
-        <p>Note that SomePackage does not take the channel name in front of it. Also be careful, this can take quite a while with large channels containing many versions.</p>
-
-        <h1>Community</h1>
-        <p>If you have questions about composer or want to help out, come and join us in the <em><a href="irc://irc.freenode.net/#composer-dev">#composer-dev</a></em> channel on irc.freenode.net.</p>
-        <p>Also join the <em><a href="http://groups.google.com/group/composer-dev">composer-dev mailing list</a></em>.</p>
-    </div>
-{% endblock %}

+ 1 - 1
src/Packagist/WebBundle/Resources/views/Web/index.html.twig

@@ -2,7 +2,7 @@
 
 {% block search %}
     <div class="box">
-        <p>Packagist is the main <a href="{{ path('about.composer') }}">Composer</a> repository. It aggregates all sorts of PHP packages that are installable with Composer.<br /><a href="{{ path('browse') }}">Browse packages</a> or <a href="{{ path('submit') }}">submit your own</a>.</p>
+        <p>Packagist is the main <a href="http://getcomposer.org/">Composer</a> repository. It aggregates all sorts of PHP packages that are installable with Composer.<br /><a href="{{ path('browse') }}">Browse packages</a> or <a href="{{ path('submit') }}">submit your own</a>.</p>
     </div>
 
     {{ parent() }}

+ 0 - 1
src/Packagist/WebBundle/Resources/views/layout.html.twig

@@ -80,7 +80,6 @@
         <footer>
             <ul>
                 <li><a href="{{ path('about') }}">{{ 'menu.about_packagist'|trans }}</a></li>
-                <li><a href="{{ path('about.composer') }}">{{ 'menu.about_composer'|trans }}</a></li>
                 <li><a href="{{ path('home') }}">{{ 'menu.home'|trans }}</a></li>
             </ul>
             <ul>