Skip to content

Commit

Permalink
Update API docs page to mention deprecation more clearly
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Feb 17, 2025
1 parent 075d2c1 commit cafb1c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Validator/ValidPackageRepositoryValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function validate(mixed $value, Constraint $constraint): void
// TODO do not check if vendor is an approved one
if (
Preg::isMatch('{(free.*watch|watch.*free|(stream|online).*anschauver.*pelicula|ver.*completa|pelicula.*complet|season.*episode.*online|film.*(complet|entier)|(voir|regarder|guarda|assistir).*(film|complet)|full.*movie|online.*(free|tv|full.*hd)|(free|full|gratuit).*stream|movie.*free|free.*(movie|hack)|watch.*movie|watch.*full|generate.*resource|generate.*unlimited|hack.*coin|coin.*(hack|generat)|vbucks|hack.*cheat|hack.*generat|generat.*hack|hack.*unlimited|cheat.*(unlimited|generat)|(mod(?!ule|el)|cheat|apk).*(hack|cheat|mod(?!ule|el))|hack.*(apk|mod(?!ule|el)|free|gold|gems|diamonds|coin)|putlocker|generat.*free|coins.*generat|(download|telecharg).*album|album.*(download|telecharg)|album.*(free|gratuit)|generat.*coins|unlimited.*coins|(fortnite|pubg|apex.*legend|t[1i]k.*t[o0]k).*(free|gratuit|generat|unlimited|coins|mobile|hack|follow))}i', str_replace(['.', '-'], '', $name))
&& !Preg::isMatch('{^(hexmode|calgamo|liberty_code(_module)?|dvi|thelia|clayfreeman|watchfulli|assaneonline|awema-pl|magemodules?|simplepleb|modullo|modernmt|modina|havefnubb|lucid-modules|codecomodo|modulith|cointavia|magento-hackathon|pragmatic-modules|pmpr|moderntribe|teamneusta|modelfox|yii2-module|chrisjenkinson|jsonphpmodifier|textmod|md-asifiqbal|modoo-id|modularthink)/}', $name)
&& !Preg::isMatch('{^(modularavel|hexmode|calgamo|liberty_code(_module)?|dvi|thelia|clayfreeman|watchfulli|assaneonline|awema-pl|magemodules?|simplepleb|modullo|modernmt|modina|havefnubb|lucid-modules|codecomodo|modulith|cointavia|magento-hackathon|pragmatic-modules|pmpr|moderntribe|teamneusta|modelfox|yii2-module|chrisjenkinson|jsonphpmodifier|textmod|md-asifiqbal|modoo-id|modularthink)/}', $name)
) {
$this->addViolation('The package name '.htmlentities($name, ENT_COMPAT, 'utf-8').' is blocked, if you think this is a mistake please get in touch with us.');

Expand Down
6 changes: 3 additions & 3 deletions templates/api_doc/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ GET https://repo.{{ packagist_host }}/p2/[vendor]/[package].json

<p>Looking to remain up to date and know when packages updated? See the <a href="#track-package-updates">Track package updates</a> API.</p>


<h4 id="get-package-metadata-v1">Using the Composer v1 metadata (DEPRECATED)</h4>
{% if 'now'|date('Ymd') < '20251001' %}
<h4 id="get-package-metadata-v1">Using the Composer v1 metadata (<a href="https://blog.packagist.com/shutting-down-packagist-org-support-for-composer-1-x/">DEPRECATED</a>, not updated anymore as of February 1st 2025, will be inaccessible from August 1st 2025)</h4>

<p>You can also send <code>If-Modified-Since</code> headers to limit your bandwidth usage and cache the files on your end with the proper filemtime set according to our <code>Last-Modified</code> header.</p>

Expand Down Expand Up @@ -287,7 +287,7 @@ GET https://repo.{{ packagist_host }}/p/[vendor]/[package].json
}
</code></pre>
<p>Working example: <code><a href="https://repo.{{ packagist_host }}/p/monolog/monolog.json">https://repo.{{ packagist_host }}/p/monolog/monolog.json</a></code></p>

{% endif %}

<h4 id="get-package-by-name">Using the API</h4>

Expand Down

0 comments on commit cafb1c5

Please sign in to comment.