[PECL-CVS] [web-pecl] master: Disable new packages from being created on PECL website
[email protected] (James Titcumb via Derick Rethans)
| Newsgroups | php.pecl.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: James Titcumb (asgrim)
Committer: Derick Rethans (derickr)
Date: 2026-01-05T13:17:53+01:00
Commit: https://github.com/php/web-pecl/commit/20beb7f226ce2438d50fc8220b7701e0192dd33e
Raw diff: https://github.com/php/web-pecl/commit/20beb7f226ce2438d50fc8220b7701e0192dd33e.diff
Disable new packages from being created on PECL website
Changed paths:
M public_html/package-new.php
M templates/pages/package_new.php
Diff:
diff --git a/public_html/package-new.php b/public_html/package-new.php
index ee0d7b7a..61e7cfd6 100644
--- a/public_html/package-new.php
+++ b/public_html/package-new.php
@@ -26,64 +26,4 @@
$container->get(Auth::class)->secure();
-$errors = [];
-$jumpTo = 'name';
-
-if (isset($_POST['submit'])) {
- $required = [
- 'name' => 'Please enter the package name.',
- 'license' => 'Please choose a license type.',
- 'category' => 'Please choose a category.',
- 'summary' => 'Please enter the one-liner description.',
- 'desc' => 'Please enter the full description.',
- ];
-
- foreach ($required as $field => $desc) {
- if (empty($_POST[$field])) {
- $errors[] = $desc;
- $jumpTo = $field;
- }
- }
-
- $_POST['license'] = trim($_POST['license']);
-
- if (
- !strcasecmp($_POST['license'], 'GPL')
- || !strcasecmp($_POST['license'], 'LGPL')
- ) {
- $errors[] = 'Illegal license type. PECL packages CANNOT be GPL/LGPL licensed and thus MUST NOT be linked to GPL code. Talk to [email protected] for more information.';
- $jumpTo = 'license';
- }
-
- if (!preg_match($container->get('valid_extension_name_regex'), $_POST['name'])) {
- $errors[] = 'Invalid package name. PECL package names must start with a letter and preferably include only lowercase letters. Optionally, numbers and underscores are also allowed.';
- }
-
- if ($container->get(PackageRepository::class)->findOneByName($_POST['name'])) {
- $errors[] = 'The '.$_POST['name'].' package already exists!';
- }
-
- if (0 === count($errors)) {
- try {
- $pkg = $packageEntity->add([
- 'name' => $_POST['name'],
- 'type' => 'pecl',
- 'category' => $_POST['category'],
- 'license' => $_POST['license'],
- 'summary' => $_POST['summary'],
- 'description' => $_POST['desc'],
- 'homepage' => $_POST['homepage'],
- 'cvs_link' => $_POST['cvs_link'],
- 'lead' => $auth_user->handle
- ]);
- } catch (\Exception $e) {
- $errors[] = 'Error occurred.';
- }
- }
-}
-
-echo $template->render('pages/package_new.php', [
- 'categories' => $container->get(CategoryRepository::class)->findAll(),
- 'jumpTo' => $jumpTo,
- 'errors' => $errors,
-]);
+echo $template->render('pages/package_new.php', []);
diff --git a/templates/pages/package_new.php b/templates/pages/package_new.php
index f947052a..e2f0e081 100644
--- a/templates/pages/package_new.php
+++ b/templates/pages/package_new.php
@@ -2,83 +2,12 @@
<?php $this->start('content') ?>
-<?php if (!isset($_POST['submit']) || 0 < count($errors)): ?>
<h1>New package</h1>
<?php $this->insert('includes/pie.php'); ?>
- <p>Use this form to register a new PECL package.</p>
+ <p>PECL has been deprecated. <strong>No new packages will be accepted onto PECL</strong>.</p>
- <p><b>Before proceeding</b>, make sure you pick the right name for your
- package. This is usually done through <i>community consensus</i>, which
- means posting a suggestion to the
- <a href="mailto:[email protected]">[email protected]</a> mailing
- list and have people agree with you.
- </p>
-
- <?php if (0 < count($errors)): ?>
- <?php foreach ($errors as $error): ?>
- <div style="color:#cc0000; font-weight: bold;"><?= $this->e($error) ?></div>
- <?php endforeach ?>
- <?php endif; ?>
-
- <form method="post" action="<?= $this->e($_SERVER['PHP_SELF']) ?>" class="pecl-form">
- <h2>Register a new PECL package</h2>
-
- <div>
- <label for="name">Package name <abbr title="required">*</abbr></label>
- <input type="text" name="name" value="<?= $this->noHtml((isset($_POST['name']) ? $_POST['name'] : '')) ?>" size="20" maxlength="80" required>
- </div>
- <div>
- <label for="license">License <abbr title="required">*</abbr></label>
- <input type="text" name="license" value="<?= $this->noHtml((isset($_POST['license']) ? $_POST['license'] : '')) ?>" size="20" maxlength="50" required>
- </div>
- <div>
- <label>Category <abbr title="required">*</abbr></label>
- <select name="category" size="1" required>
- <option value="">--Select category--</option>
- <?php foreach ($categories as $category): ?>
- <option value="<?= $this->noHtml($category['id']) ?>">
- <?= $this->e($category['name']) ?>
- </option>
- <?php endforeach; ?>
- </select>
- </div>
- <div>
- <label>Summary <abbr title="required">*</abbr></label>
- <input type="text" name="summary" value="<?= $this->e((isset($_POST['summary']) ? $_POST['summary'] : '')) ?>" size="60" placeholder="Enter a one-liner description" required>
- </div>
- <div>
- <label>Full description <abbr title="required">*</abbr></label>
- <textarea name="desc" cols="60" rows="3" required><?= $this->e((isset($_POST['desc']) ? $_POST['desc'] : '')) ?></textarea>
- </div>
- <div>
- <label>Additional project homepage</label>
- <input type="text" name="homepage" value="<?= $this->e((isset($_POST['homepage']) ? $_POST['homepage'] : '')) ?>" size="40" maxlength="255" placeholder="https://example.com">
- </div>
- <div>
- <label>Browse source URL</label>
- <input type="text" name="cvs_link" value="<?= $this->e((isset($_POST['cvs_link']) ? $_POST['cvs_link'] : '')) ?>" size="40" maxlength="255" placeholder="https://git.php.net/?p=pecl/php/operator.git">
- </div>
- <div>
- <label> </label>
- <input type="submit" name="submit" value="Submit request">
- </div>
- </form>
-
- <?php if (0 < count($errors) && $jumpTo): ?>
- <script>
- document.forms[1].<?= $this->noHtml($jumpTo) ?>.focus();
- </script>
- <?php endif ?>
-
-<?php else: ?>
- <p>The package
- <a href="/package/<?= $this->noHtml($_POST['name']) ?>">
- <?= $this->noHtml($_POST['name']) ?>
- </a>
- has been registered in PECL.<br>
- You have been assigned as lead developer.</p>
-<?php endif ?>
+ <p>Please follow the instructions to add your extension to the PIE ecosystem: <a href="https://github.com/php/pie/blob/main/docs/extension-maintainers.md">PIE for Extension Maintainers</a>.</p>
<?php $this->end('content') ?>