jmespath / jmespath/jmespath.php

To fork or not to fork

Ouverte
#91 6 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
PHP
Étoiles
2k
Forks
57
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Hey @GrahamCampbell I'm rudely pinging you, I hope you will forgive me.

We've recently switched to the clientside community implementation since the one here is no longer supported.
However we also use this implementation in our backend.

We've found some inconsistencies between the community implementation and the PHP and JS implementations here. In this case the community implementation is correct according to the spec.

My question to you is this: Would you accept PRs that fix spec compliance while breaking consistency with other libraries in this org?

I'd prefer not to fork this to the community org if we can instead maintain it here; on the other hand while you're keeping this alive, it's not being actively developed (no blame, just observation).

What would your preference be? Since we use JMESPath I'm happy to contribute in the form of a fork with the community or by making PRs here; but I'd love your opinion before I make a choice.

The specific issue we're running into is the case of an unquoted string inside a JSON literal:
```
[?abc == `def`]
```
Which is supported in this library: https://github.com/jmespath/jmespath.php/blob/master/src/Lexer.php#L432
The fix is easy of course, but we'd break consistency with the JS implementation.

The specification where this is defined lives here: https://github.com/jmespath-community/jmespath.spec/blob/main/jep-012-raw-string-literals.md
Which is obsoleted by 12a: https://github.com/jmespath-community/jmespath.spec/blob/main/jep-012a-raw-string-literals.md

TLDR; would you accept PRs that update this library to newer community specs or do you prefer to keep this implementation consistent with other implementations in this ORG?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start with src/Lexer.php around line 432 and compare the handling of [ ?abc == `def` ] with jmespath-community/jmespath.spec, especially JEP-012a. The issue first needs a maintainer decision about adopting newer community specifications versus preserving consistency with other implementations; only then can completion criteria be defined.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
php
Domaine
backend
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Calme
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.