php / web-pecl

The PECL website
http://pecl.php.net
Other
34 stars 31 forks source link

Fixes issue with Category Package Info REST response #79

Closed dbalabka closed 1 year ago

dbalabka commented 5 years ago

Fixes error:

error on line 118 at column 10: XML declaration allowed only at the start of the document

for REST response: https://pecl.php.net/rest/c/Authentication/packagesinfo.xml

Testing notes

  1. Create site database
  2. Load fixtures
    bin/console app:generate-fixtures
  3. Create new release for one package:
    INSERT INTO pecl.releases (id, package, version, state, doneby, license, summary, description, releasedate, releasenotes, packagefile) VALUES (1, 65, '1.0.0', 'stable', 'some', 'MIT', 'bla bla', 'blabla', '2019-02-10 22:50:39', 'reaerfae', 'ert');
  4. Generate REST
    bin/generate-rest.php
dbalabka commented 5 years ago

@petk could you please take a look?

petk commented 5 years ago

Hello, just checking this one. Thank you for the pull request. I'll check it out and add it as a quick fix...

Otherwise, these so called REST files are in need of some refactoring and improvement, yes. We'll need to change the procedure for their generation or if I'll be able to get in contact with someone from the systems people for this site so we can make them dynamic and cached instead... Issue is that the number of PECL packages and their releases have grown. And the once working methods for simple generation of these files aren't that suitable anymore.

This issue has been reported several times in the past so I'm aware of it and ii is on the next todo item as soon as I get site templates sorted out properly: https://bugs.php.net/bug.php?id=76719

It also seems to me that this has already been fixed. At least according to my local testing. The files you're looking at https://pecl.php.net/rest/c/Authentication/packagesinfo.xml are static files from the past. But anything is possible that there is this bug still present.

I'll check what can be done here and how soon the refactoring can be done.

Also migration to the REST 1.3 (some PEAR thing that provides some newer options) is planned which change the XML structure of these files a bit).

petk commented 5 years ago

Hello, just a quick update from my side here why this is taking abnormally long here :D Yes, such as simple thing and functionality and still not fixed. Basically, I have no access to any servers nor databases here and basically other people run this project... I've also moved a bit to other projects due to problematic contributing experience and people behind the PHP websites here. So, basically I hope someone will be able to take a look at this one day. Or if the pecl.php.net site simply starts moving to some other 3rd party service and Composer or pickle takes over it one day...

dbalabka commented 5 years ago

It's ok. I understand that, and also believe that in future pecl packages should move in direction of composer or pickle. We can leave the PR open for now.

derickr commented 1 year ago

I am closing this, as it has not seen updates for years, and replacing PECL is now a step closer.

dbalabka commented 1 year ago

@derickr , could you please share what replacement you are referencing?