Coder Social home page Coder Social logo

koriym / koriym.attributes Goto Github PK

View Code? Open in Web Editor NEW
39.0 39.0 7.0 133 KB

A reader can read both doctrine/annotations and PHP8 attributes with a doctrine annotation interface.

Home Page: https://packagist.org/packages/koriym/attributes

License: MIT License

PHP 100.00%
annotatios attributes php

koriym.attributes's People

Contributors

kenjis avatar koriym avatar naokitsuchiya avatar oskarstark avatar tomasvotruba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

koriym.attributes's Issues

Thank you!

Hi Akihito,

this package is exactly what I was looking for. Doctrine annotation reader that would be able to read attributes and create objects from them ๐Ÿ‘

Amazing work, thanks!

The DualReader can handle only one of them

@koriym Hi, I came to a bug when only annotations or attributes are used. The DualReader can handle only one of them, depending on PHP version.

This caused missing annotations on PHP 8. I think more reliable solution would be class like this one - that reads both annotations and attributes on PHP 8, if available. That's what I expected from DualReader class and that's where it failed my expectations. But maybe there is a better way to do it.

From contributte/apitte#165 (review)

Make the annotations (attributes) read by DualReader unique

With Dual Reader, two "annotations" will be read in the following cases.

#[FakeCacheable]
/**
 * @FakeCacheable
 */
class FakeDual

Shouldn't only one annotation be read?
(This can be done using array_unique)

It is mainly intended for library code, so all users of the doctrine/annotation reader, attribute reader, and the dual reader will get the same results.

Upgrading to 1.0.1 has caused some tests to fail .

@TomasVotruba Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.