silverstripe / api.silverstripe.org

API documentation for the Silverstripe Framework
BSD 3-Clause "New" or "Revised" License
3 stars 14 forks source link

Master docs won't render due to ::class bug #45

Closed andrewandante closed 7 years ago

andrewandante commented 7 years ago

There is now a bug with the MASTER docs where an error:

The TokenReflection library threw an exception while parsing the file

Occurs when parsing a file using the MyClass::class syntax - which is all over SS4. See https://github.com/ApiGen/ApiGen/issues/680 for the issue. There are two ways to solve this: either use the fork of the token reflection: https://github.com/ApiGen/ApiGen/issues/680#issuecomment-220785151 or upgrade to the unstable 5.0.0-rc5 (and PHP7.1).

robbieaverill commented 7 years ago

Uh oh! Do you know of any platform changes that might have caused this recently, or what has changed for it to start happening?

tractorcow commented 7 years ago

Time to updpate to 5.0.0! :D

robbieaverill commented 7 years ago

Reference #29.

I tried this a while ago. It's not a quick upgrade. From memory the CLI has removed most of its configuration options (https://github.com/ApiGen/ApiGen/issues/973) which isn't a blocker but will require us to adjust our generation script a bit, and the theme configuration has changed.

tractorcow commented 7 years ago

Could an upgrade to 4.x work in the mean time?

robbieaverill commented 7 years ago

Quite possibly. I think 5.x was pretty fresh at the time and wasn't stable yet.

andrewandante commented 7 years ago

First occurrence was September 21st - no deployments or anything at that time. My guess is that a change in Framework around then triggered it - not much crucial that I can see from that time though - maaaaaaaaaaaaybe https://github.com/silverstripe/silverstripe-framework/commit/261302a12150b88068a70f829f7265f31e57f551 but I doubt it.

5.0.0 still isn't stable I don't think - I'd look into the fork of the tokeniser I think. However, 4.x is no longer supported because of the tokeniser issue - so it's a bit of a no-win situation.

For reference, the first files to trip it up were:

In that order, all on the 21st. Don't know if that helps much :)

tractorcow commented 7 years ago

Is it possible to back-port the tokeniser fix to 4.x? would it be accepted if we do so?

tractorcow commented 7 years ago

5.x doesn't look feasible yet https://github.com/ApiGen/ApiGen/issues/1015

tractorcow commented 7 years ago

Can we just use another api generator?

tractorcow commented 7 years ago

https://github.com/phpDocumentor/phpDocumentor2 maye.

sminnee commented 7 years ago

@tractorcow is this still an issue on your Sami version?

tractorcow commented 7 years ago

No its fixed.