Closed marioquartz closed 3 years ago
Did you do this with a roster.json file?
I have not that file. Is need in the first time?
No, it shouldn't be needed. I'm debugging now, should have a patch shortly.
Alright, there were multiple issues with first time runs that have now been resolved. I successfully ran it on a repo that had no docs at all.
Fixed in v0.1.5
BTW @marioquartz I greatly appreciate this. I made a ton of changes since I released v0.1.0 and it's been hard actually testing all of the paths.
New bug. The process start, load templates, start processing files, and in the first file stop and show this:
Warning: Undefined array key 1 in /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php on line 281
Fatal error: Uncaught TypeError: Samsara\Mason\DocBlockProcessor::pushTag(): Argument #1 ($tag) must be of type string, null given, called in /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php on line 143 and defined in /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php:192
Stack trace:
#0 /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php(143): Samsara\Mason\DocBlockProcessor->pushTag(NULL, '', '', '')
#1 /app/vendor/samsara/roster/src/Samsara/Roster/Processors/ClassProcessor.php(46): Samsara\Mason\DocBlockProcessor->__construct('/**\n * Class Ev...', false)
#2 /app/vendor/samsara/roster/src/Samsara/Roster/Roster.php(479): Samsara\Roster\Processors\ClassProcessor->__construct(Object(ReflectionClass))
#3 /app/vendor/symfony/console/Command/Command.php(299): Samsara\Roster\Roster->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /app/vendor/symfony/console/Application.php(978): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /app/vendor/symfony/console/Application.php(295): Symfony\Component\Console\Application->doRunCommand(Object(Samsara\Roster\Roster), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /app/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /app/vendor/samsara/roster/src/Samsara/Roster/App.php(32): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /app/vendor/samsara/roster/bin/roster(25): Samsara\Roster\App->run()
#9 {main}
thrown in /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php on line 192
There are a docs/roster-export/latest empty directory. And no new json.
This is actually a bug in Mason. Problem with regex.
Should be fixed. EDIT: To clarify, I pushed a patch and now it should be fixed.
I have update mason to v0.2.3 and I try again. The error is the same. And I think the file processed is this:
<?php
declare(strict_types=1);
namespace Marioquartz\MakingSessions;
/**
* Class EventList
* @package Marioquartz\MakingSessions
* @method EventList orderList($list, $type, $inverse = false)
*/
class EventList extends ItemList
{
public function order(): EventList
{
return self::orderList($this, 'Event');
}
}
maybe the dockblock has something strange?
When removing the docblock of that class Roster works fine.
Yeah, regex is weird. It's probably the wrong options on the function call.
When removing the docblock of that class Roster works fine.
Do you have other docblocks that have a method tag in them?
Do you have other docblocks that have a method tag in them?
No, its the only class with that tag, but when I uses in a similar class (SessionList) gives the same error.
Updated to mason v0.2.4 gives the same error with different lines.
Warning: Undefined array key 1 in /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php on line 283
Fatal error: Uncaught TypeError: Samsara\Mason\DocBlockProcessor::pushTag(): Argument #1 ($tag) must be of type string, null given, called in /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php on line 144 and defined in /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php:194
Stack trace:
#0 /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php(144): Samsara\Mason\DocBlockProcessor->pushTag(NULL, '', '', '')
#1 /app/vendor/samsara/roster/src/Samsara/Roster/Processors/ClassProcessor.php(46): Samsara\Mason\DocBlockProcessor->__construct('/**\n * Class Se...', false)
#2 /app/vendor/samsara/roster/src/Samsara/Roster/Roster.php(479): Samsara\Roster\Processors\ClassProcessor->__construct(Object(ReflectionClass))
#3 /app/vendor/symfony/console/Command/Command.php(299): Samsara\Roster\Roster->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /app/vendor/symfony/console/Application.php(978): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /app/vendor/symfony/console/Application.php(295): Symfony\Component\Console\Application->doRunCommand(Object(Samsara\Roster\Roster), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /app/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /app/vendor/samsara/roster/src/Samsara/Roster/App.php(32): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /app/vendor/samsara/roster/bin/roster(25): Samsara\Roster\App->run()
#9 {main}
thrown in /app/vendor/samsara/mason/src/Samsara/Mason/DocBlockProcessor.php on line 194
Alright, I'm closing this and creating a bug in the mason repo: JordanRL/Mason#1
For now, I guess the method tags an unusable, though Roster doesn't currently document them, so it doesn't reduce functionality.
Describe the bug When using
php vendor/bin/roster
the code tries use and undefined $oldConfigTo Reproduce
php vendor/bin/roster
in a library for first time.Expected behavior Documentation generated
PHP Version PHP 8.0.8 (cli)
Additional context Stack: