Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 08 2021 11:36
    mindplay-dk commented #138
  • Dec 06 2021 16:19
    aik099 closed #138
  • Dec 06 2021 16:19
    aik099 commented #138
  • Dec 04 2021 18:59
    aik099 opened #138
  • Nov 07 2021 18:13
    aik099 closed #137
  • Nov 07 2021 18:13

    aik099 on master

    Improve GitHub Actions workflow… Merge pull request #137 from ai… (compare)

  • Nov 07 2021 18:06
    aik099 opened #137
  • Oct 31 2021 11:28

    aik099 on master

    Change build badge to Travis CI (compare)

  • Oct 31 2021 11:25

    aik099 on master

    Move to GitHub Actions (#136) … (compare)

  • Oct 31 2021 11:25
    aik099 closed #136
  • Oct 31 2021 11:23
    aik099 synchronize #136
  • Oct 31 2021 10:53
    aik099 synchronize #136
  • Oct 31 2021 10:40
    aik099 opened #136
  • Jan 29 2021 13:19
    mindplay-dk opened #135
  • Jan 29 2021 00:21
    szepeviktor commented #134
  • Jan 28 2021 20:49
    aik099 commented #134
  • Jan 28 2021 20:49

    aik099 on master

    Improve CI All there is left f… Merge pull request #134 from sz… (compare)

  • Jan 28 2021 20:49
    aik099 closed #134
  • Jan 25 2021 16:48
    szepeviktor closed #133
  • Jan 25 2021 16:47
    szepeviktor opened #134
Alex
@aik099

How about 'Install dependencies first '

Not sure what you mean by that.

Lester Caine
@lsces
Basically how do I use php-annotations WITHOUT composer ... I run php on several servers and have phar disabled along with 'command line' php as they run several versions in parallel in order to keep legacy sites running while bowing to the pressure from the security needs of other code. I don't need composer to run any of the rest of the code base ... http://lsces.org.uk/externals/php-annotations/demo/index.php
Alex
@aik099
You can. Not sure if it's still there, but before php-annotations was using composer it was using it's own auto-loader. If it's missing then:
  • you can create one and submit PR that I would gladly accept
  • you can configure auto-loader you-re using in the project to auto-load php-annotations own classes
Lester Caine
@lsces
It was using Loader.php from the test section. Now I've got the development environment sorted I can rewind prior to composer as necessary ;)
Alex
@aik099
I highly don't recommend doing that due number of bugfixes and improvements since that moment.
I recommend sending a PR where Loader.php is resurrected and updated to support new class placement.
You won't be able to use the library on PHP 5.2 though if that's your intension due namespace usage.
Lester Caine
@lsces
That is more what I mean ... but I have the demo code using Loader and can identify other changes ...
Lester Caine
@lsces
Main problem with the autoloader crap is that the directory names no longer line up ... mindplay -> src ... but then I refuse to use PSR as well ;)
Alex
@aik099
it's PSR-4 now if I'm not mistaken
I've created an issue about this php-annotations/php-annotations#111 . Once you send a PR you can reference that issue.
Lester Caine
@lsces
I can see now why I was having a problem with the Smarty3 recent switch to composer ... just sorted the problem that created so bypassing composer here should be a little easier. I'd not twigged that 'namespace' and 'directory' did not need to be the same, so while the classes are still 'mindplay', they can be loaded from 'src' ...
Alex
@aik099
the filenames match class name as in PSR-0, but the namespace prefix is mapped to src directory. not that hard.
Lester Caine
@lsces
http://lsces.org.uk/externals/php-annotations/demo/index.php ... the demo namespace is messing up the code one ... at least I think that is the case, I'll have the local code mirror accessible shortly ...
Lester Caine
@lsces
http://hg.lsces.org.uk/bw/bitweaver/externals/php-annotations/rev/6f00bebda38d ... mirror of github which I can play with locally. My problem is not really understanding where the automatic load picks up different directories of files.
the demo script adds one more mapping to that array: https://github.com/php-annotations/php-annotations/blob/master/demo/index.php#L20
just basic composer autoloader configuration, nothing custom here.
Lester Caine
@lsces
But I don't have composer loaded ... trying to avoid the hassle.
Alex
@aik099
I'm still not sure why you you've decided not to use Composer, but it's your choice and I'm respecting it. Please do inspect composer autoloader code next time instead of reinventing the wheel.
Lester Caine
@lsces
I've supposedly installed it on this machine ... but I can't find where it's hidden itself! My code was never designed to follow the changes that PSR and composer now require and it's proving difficult when the likes of Smarty now break working code by changing everything to work with it. My production servers all run nginx and various fpm versions of PHP including PHP5.2 still, so some code has to be stable back that far and keeping composer out of the picture helps make that stable.
Alex
@aik099
I see. Then I wish you luck with writing custom autoloader for php-annotations and looking forward to seeing PR containing it from you.
Lester Caine
@lsces
OK I've got my own PSR4 loader and that is working, but the error is the same ... where IS the RangeAnnotation class defined? http://lsces.org.uk/externals/php-annotations/demo/ is now running with the AutoLoader and a modified index.php file so NOW I can start playing :)
Alex
@aik099
Do you have xdebug installed? It would be really easier to just debug and see line where it fails. The https://github.com/php-annotations/php-annotations/blob/master/demo/index.php#L31 line adds @range annotation by specifying FQCN of RangeAnnotation class.
Lester Caine
@lsces
There is no class in the code for RangeAnnotation. I run Eclipse/PDT and I can switch on xdebug, but I don't need that to see https://github.com/php-annotations/php-annotations/tree/master/src/annotations/standard has no RangeAnnotation and there is nothing in the AnnotationManager to register it. I've found it back at rev 85, along with some of the other annotations loaded as part of the demo, but they should all be in the main code base!
Alex
@aik099
:smile: , so the demo isn't working even, when powered by Composer's autoloader you're saying?
Lester Caine
@lsces
I would be most surprised if it was ...
Alex
@aik099
Apparently we've forgot that annotation is used in the demo, when moved them to "standard-annotations" branch: https://github.com/php-annotations/php-annotations/tree/standard-annotations/src/annotations/standard
Alex
@aik099
As I've said above it's in "standard-annotations" branch
php-annotations/php-annotations#112 - I've created an issue about it
solution is simple: copy over it's definition from that branch into demo namespace & register it within demo annotation package
a PR for that would be awesome
I guess nobody tried to run demo code recently
Lester Caine
@lsces
Would have been nice if you flagged that master branch is defunct and no longer supported!
Alex
@aik099
it's otherwise
the "master" branch is supported
the "standard-annotations" isn't
fact, that you've found a bug in "master" branch doesn't mean it's no longer supported. it's bug in demo script after all, that isn't used in production.
:smile:
Lester Caine
@lsces
https://github.com/php-annotations/php-annotations defaults to master ... select standard-annotations branch and I see the /tree/standard-annotations and the correct code!
Alex
@aik099
in old days standard annotations were part of master branch. since they doesn't help anybody we've moved them to separate branch for review and copied ones, needed by demo script to demo namespace
as I've said in above mentioned task the RangeAnnotation class was forgotten in that move
Lester Caine
@lsces
I'm getting lost here ... range and length are just the annotations I want to use as standard annotations ... but they are not supplied as standard?
Alex
@aik099
They are not standard annotations. See PHPDoc: https://www.phpdoc.org/docs/latest/index.html
What's in "standard-annotations" branch are stubs of annotations and aren't generally useful. That's why they were removed from "master" branch and thrus from release.
the @range and @length in particular are used in demo only to demonstrate some validation possibilities through annotations. but they're not standard and that's why exist only in demo
I see no problem adding "@deprecated" and "@throws" and such annotations back to "master" branch if somebody would create them according to current PHPDoc website specification.
Lester Caine
@lsces
That is not relevant ... the whole point of annotation is to add the missing metadata ... which is why I still use the original phpDocumentor. The current one lost many of the 'standard features' that were provided!