Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make 3rd party libs composer dependencies #1970

Open
3 of 5 tasks
splitbrain opened this issue May 13, 2017 · 9 comments
Open
3 of 5 tasks

Make 3rd party libs composer dependencies #1970

splitbrain opened this issue May 13, 2017 · 9 comments

Comments

@splitbrain
Copy link
Collaborator

splitbrain commented May 13, 2017

We've started the process of using composer for 3rd party libs already, but we still have a few that are just copies in our own code and thus hard to update. We need to find proper maintained upstream projects for them, replace them with other libraries or decide to maintain our own package of it.

  • DifferenceEngine.php
  • JpegMeta.php
  • EmailAddressValidator.php
  • feedcreator.class.php
  • IXR_Library.php

Keeping them as is will not be feasible for much longer because of the speed the PHP project is now moving. Some of these libs will start failing in the upcoming PHP releases.

@splitbrain
Copy link
Collaborator Author

splitbrain commented May 13, 2017

Replacing the Difference Engine is difficult. As explained in 72dbd63 there's quite some evolution in what we're using.

There are https://github.com/pear/Text_Diff and https://github.com/horde/horde/tree/master/framework/Text_Diff - However both do not include the changes made by PHPWiki and MediaWiki to actually format the diff output to tables.

MediaWiki's implementation has had some changes in the past as well, but is not installable as a separate composer source. https://github.com/wikimedia/mediawiki/tree/master/includes/diff - it seems not to include the changes needed for 3way merges we have in our patch above (which is not in master yet).

Making a separate composer package based on our current version + 3way patch + mediawiki changes + maybe changes from Horde might be a way to go. It would also be a fine opportunity for anyone who want have their own Open Source Project.

@splitbrain
Copy link
Collaborator Author

splitbrain commented May 13, 2017

JpegMeta seems to be completely abandoned, it has bugs (#1932) and no follow up projects are known to me. We'd probably fare best if we'd replace it by something else completely.

A good candidate seems to be https://github.com/lsolesen/pel

A library supporting reading and writing metadata for more than JPEG files (eg PDF, ODT, etc) would be awesome, too. But I'm not aware of any PHP libraries offering that.

@splitbrain
Copy link
Collaborator Author

splitbrain commented May 13, 2017

For the EmailAddressValidator this seems to be okay: https://github.com/aziraphale/email-address-validator It was last changed in 2015 though. OTOH there's not much innovation needed here.

We should see if our patches a18f9d4 and c9ec623 are needed on that version and if they are accepted by the maintainer.

There are also a few automatic exports from google code which can be found when searching for php-email-address-validation. But none of them seems to be maintained.

An even better alternative would be to use PHP's own validation with filter_var() http://php.net/manual/en/filter.examples.validation.php It should be available from 5.2 onwards. However a quick check shows that it does not pass all our tests (IPv6, local addresses and local part comments fail).

@splitbrain
Copy link
Collaborator Author

There seems to be a follow up project for FeedCreator here: https://github.com/flack/UniversalFeedCreator last change in 2016.

We do have some changes in our version and need to check which of them need to be applied to the above project: https://github.com/splitbrain/dokuwiki/commits/master/inc/feedcreator.class.php

splitbrain added a commit that referenced this issue May 19, 2017
* master: (80 commits)
  use composer based library for feed creator #1970
  fixed typo in methodname
  updated GeSHi to 1.0.9.0
  refomatted mail tests to use data provider
  fix error in config manager caused by changes visibility
  Continue if there are no attributes
  avoid dependency tests being marked as risky
  replaced some more each calls
  remove deprecated each() call
  test constructors need to call parent constructor
  use dataprovider in password tests
  removed deprecated blowfish class
  replace some var keywords
  translation update
  PassHash.class.php: in case of brcrypt, use the most recent variant $2y$
  translation update
  Fix Typo in remote API (#1938)
  translation update
  translation update
  translation update
  ...
@andreasferber
Copy link
Contributor

andreasferber commented Nov 26, 2017

Another possible JpegMeta replacement might be https://github.com/PHPExif/php-exif. It can use either the native PHP exif extension, which supports at least a bunch of common image file formats in addition to JPEG, or the external exiftool, which supports a whole lot more file formats, not only images (see https://sno.phy.queensu.ca/~phil/exiftool/#supported).

Which backend to use should probably be made configurable, since the exiftool backend requires the installation of extra software and might be slower.

@Klap-in
Copy link
Collaborator

Klap-in commented Jan 3, 2018

For the fileuploader is used a small javascript library valums Ajax Upload (old site: http://valums.com/ajax-upload/) , which is not maintained any more. See for last maintenance attempt:
https://github.com/Valums-File-Uploader/file-uploader
So far I know and see, there are no open issues known that affect us.

Who knows a good replacement for this javascript file uploader?

@splitbrain
Copy link
Collaborator Author

splitbrain commented Apr 24, 2019

For the IXRLibrary we could use https://github.com/kissifrot/php-ixr - it hasn't updated since 2016, but also has no open issues or pull requests. Wordpress used to use their own version of this lib from which we ported some stuff a while ago. We need to check how our changes are reflected in the kissifrot version.

@Klap-in
Copy link
Collaborator

Klap-in commented Apr 24, 2019

A predecessor for the Valums file uploader is the Fine-file-uploader https://github.com/FineUploader/fine-uploader, which has a MIT license according to Valums-File-Uploader/file-uploader#58, but it is unfortunately not maintained anymore.

An nice alternative seems https://uppy.io/ - https://github.com/transloadit/uppy (MIT license) available via npm.

Bit longer overview: https://ourcodeworld.com/articles/read/715/top-7-best-open-source-javascript-and-jquery-file-uploader-plugins

splitbrain added a commit that referenced this issue Sep 16, 2021
This is a monky patched version of kissyfrot/php-ixr until my PR has
been accepted upstream.

Plugins using the XML RPC client may need adjustments.
splitbrain added a commit that referenced this issue Nov 11, 2021
move IXR XML RPC to composer dependency #1970
splitbrain added a commit that referenced this issue Nov 11, 2021
* master: (37 commits)
  disable jit compiling to avoid broken pcre lib #3507
  Remove phpunit cache.
  Fix PHPUnit fatal errors compatibility with void.
  Method names with leading double underscore are reserved by PHP.
  fix named access to the sha hashing mechanisms
  adjust help text of extension cli
  move IXR XML RPC to composer dependency #1970
  translation update
  🔥 fix the calculation of file permissons
  Do not duplicate the foreach ($installed...
  translation update
  Allow installing extenions from URL via the CLI
  Add support for SHA256 encrypted passwords
  plugins/extension: Fix git recognition for plugin installations via git-submodules.
  HTTPClient: Fix missing processing of redirections with status code 303, 307, 308.
  SVG for interwiki links
  translation update
  manifest: add NOSESSION to not require auth
  add missing google interwiki link. fixes #3502
  translation update
  ...
@splitbrain
Copy link
Collaborator Author

Another candidate for exif data: https://github.com/diderich/metadata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants