portabilis / i-educar

Lançando o maior software livre de educação do Brasil!
https://ieducar.org
GNU General Public License v2.0
606 stars 453 forks source link

Erro na instalação do pacote de relatórios para a versão 2.9 do i-Educar #961

Closed msoares94 closed 4 months ago

msoares94 commented 4 months ago

DESCRIÇÃO:

Ao tentar realizar a instalação o i-educar-reports-package, branch 2.9, commit 4b05b72 em cima do i-Educar 2.9 disponível na branch 2.9, commit 268c367 (Utiliza CSS para layout) está ocorrendo o seguinte erro abaixo:

Comando: composer update-install


Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
PHP Fatal error:  Cannot redeclare static Illuminate\Database\Eloquent\Model::$builder as non static App\Models\LegacyModel::$builder in /var/www/ieducar/app/Models/LegacyModel.php on line 10

   Symfony\Component\ErrorHandler\Error\FatalError 

  Cannot redeclare static Illuminate\Database\Eloquent\Model::$builder as non static App\Models\LegacyModel::$builder

  at app/Models/LegacyModel.php:10
      6▕ 
      7▕ use App\Models\Builders\LegacyBuilder;
      8▕ use Illuminate\Database\Eloquent\Model;
      9▕ 
  ➜  10▕ class LegacyModel extends Model
     11▕ {
     12▕     public array $legacy = [];
     13▕ 
     14▕     protected string $builder = LegacyBuilder::class;

   Whoops\Exception\ErrorException 

  Cannot redeclare static Illuminate\Database\Eloquent\Model::$builder as non static App\Models\LegacyModel::$builder

  at app/Models/LegacyModel.php:10
      6▕ 
      7▕ use App\Models\Builders\LegacyBuilder;
      8▕ use Illuminate\Database\Eloquent\Model;
      9▕ 
  ➜  10▕ class LegacyModel extends Model
     11▕ {
     12▕     public array $legacy = [];
     13▕ 
     14▕     protected string $builder = LegacyBuilder::class;

      +1 vendor frames 

  2   [internal]:0
      Whoops\Run::handleShutdown()

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
Script @composer update handling the update-install event returned with error code 255

Comando: composer plug-and-play

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
PHP Fatal error:  Cannot redeclare static Illuminate\Database\Eloquent\Model::$builder as non static App\Models\LegacyModel::$builder in /var/www/ieducar/app/Models/LegacyModel.php on line 10

   Symfony\Component\ErrorHandler\Error\FatalError 

  Cannot redeclare static Illuminate\Database\Eloquent\Model::$builder as non static App\Models\LegacyModel::$builder

  at app/Models/LegacyModel.php:10
      6▕ 
      7▕ use App\Models\Builders\LegacyBuilder;
      8▕ use Illuminate\Database\Eloquent\Model;
      9▕ 
  ➜  10▕ class LegacyModel extends Model
     11▕ {
     12▕     public array $legacy = [];
     13▕ 
     14▕     protected string $builder = LegacyBuilder::class;

   Whoops\Exception\ErrorException 

  Cannot redeclare static Illuminate\Database\Eloquent\Model::$builder as non static App\Models\LegacyModel::$builder

  at app/Models/LegacyModel.php:10
      6▕ 
      7▕ use App\Models\Builders\LegacyBuilder;
      8▕ use Illuminate\Database\Eloquent\Model;
      9▕ 
  ➜  10▕ class LegacyModel extends Model
     11▕ {
     12▕     public array $legacy = [];
     13▕ 
     14▕     protected string $builder = LegacyBuilder::class;

      +1 vendor frames 

  2   [internal]:0
      Whoops\Run::handleShutdown()

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255

AMBIENTE:

edersoares commented 4 months ago

@msoares94 fixe a versão do laravel/framework em 11.14, houve um conflito devido ao PR https://github.com/laravel/framework/pull/51851 e estamos trabalhando para resolver.

msoares94 commented 4 months ago

@edersoares a sugestão corrigiu o problema do processo de instalação do pacote de relatórios no i-Educar, muito obrigado por isso.

Na sequênia, seguindo o processo de instalação do pacote de relatórios, aparentemente tudo sem erro, no entanto ao consultar o i-Educar no browser os menus que fazem parte do pacote de relatórios não são exibidos, acredita ter algo relacionado a esse problema de MR?

Segue log da execução:

Obs.: Segui o processo de instalação disponível em: https://github.com/portabilis/i-educar-reports-package/


   INFO  Running migrations.  

  2020_01_01_191000_base_menus .................................. 51.29ms DONE
  2020_01_01_192000_add_age_distortion_in_serie_report_menu ...... 3.28ms DONE
  2020_01_01_192000_add_birthdays_report_menu .................... 2.71ms DONE
  2020_01_01_192000_add_class_average_comparative_report_menu .... 2.88ms DONE
  2020_01_01_192000_add_class_record_book_menu ................... 2.47ms DONE
  2020_01_01_192000_add_conclusion_certificate_report_menu ....... 2.38ms DONE
  2020_01_01_192000_add_conference_evaluations_faults_report_menu  2.47ms DONE
  2020_01_01_192000_add_distribution_of_uniform_per_student_report_menu  3.84ms DONE
  2020_01_01_192000_add_educational_progress_and_procedures_report_menu  2.94ms DONE
  2020_01_01_192000_add_final_result_report_menu ................. 2.92ms DONE
  2020_01_01_192000_add_frequency_certificate_report_menu ........ 2.51ms DONE
  2020_01_01_192000_add_registration_certificate_report_menu ..... 2.59ms DONE
  2020_01_01_192000_add_report_card_report_menu .................. 2.45ms DONE
  2020_01_01_192000_add_school_history_report_menu ............... 2.35ms DONE
  2020_01_01_192000_add_schools_report_menu ...................... 2.92ms DONE
  2020_01_01_192000_add_servant_sheet_report_menu ................ 2.70ms DONE
  2020_01_01_192000_add_servants_report_menu ..................... 2.30ms DONE
  2020_01_01_192000_add_student_disciplinary_occurrence_report_menu  2.37ms DONE
  2020_01_01_192000_add_student_sheet_report_menu ................ 2.69ms DONE
  2020_01_01_192000_add_students_average_report_menu ............. 2.63ms DONE
  2020_01_01_192000_add_students_entrance_and_allocation_report_menu  2.50ms DONE
  2020_01_01_192000_add_students_movement_report_menu ............ 2.55ms DONE
  2020_01_01_192000_add_students_per_class_report_menu ........... 2.50ms DONE
  2020_01_01_192000_add_students_per_projects_report_menu ........ 3.39ms DONE
  2020_01_01_192000_add_students_transferred_abandonment_report_menu  3.32ms DONE
  2020_01_01_192000_add_students_with_benefits_report_menu ....... 3.33ms DONE
  2020_01_01_192000_add_students_with_disabilities_report_menu ... 3.36ms DONE
  2020_01_01_192000_add_teacher_report_card_report_menu .......... 3.07ms DONE
  2020_01_01_192000_add_teachers_and_courses_taught_by_class_report_menu  3.12ms DONE
  2020_01_01_192000_add_transference_certificate_report_menu ..... 3.19ms DONE
  2020_01_01_192000_add_vacancy_certificate_report_menu .......... 2.63ms DONE
  2020_06_19_152923_recreate_view_dados_escola .................. 32.10ms DONE
  2022_10_18_103500_add_general_movement_report_menu ............. 2.97ms DONE
  2022_10_19_090723_add_monthly_movement_report_menu ............. 2.67ms DONE
  2022_10_19_152923_add_final_situation_report_menu .............. 2.54ms DONE
  2022_11_06_192000_add_report_view_historic_eja ................ 19.38ms DONE
  2022_11_08_152925_add_user_access_report_menu .................. 6.63ms DONE
  2022_11_08_153924_add_user_access_graphic_report_menu .......... 5.63ms DONE
  2022_11_08_153955_add_employee_allocated_time_report_menu ...... 4.00ms DONE
  2022_11_08_154955_add_teachers_per_school_class_report_menu .... 6.90ms DONE
  2022_11_09_114955_add_registration_school_report_menu .......... 3.90ms DONE
  2022_11_09_114964_add_parent_signature_report_menu ............. 3.61ms DONE
  2022_11_09_114975_add_ score_absence_release_report_menu ....... 3.85ms DONE
  2022_11_17_152925_add_tags_report_menu ......................... 3.40ms DONE
  2022_11_17_152926_add_not_enrollment_report_menu ............... 3.65ms DONE
  2022_11_17_152927_add_pending_students_report_menu ............. 3.63ms DONE
  2022_11_17_152929_add_schooling_certificate_report_menu ........ 3.91ms DONE
  2022_11_18_152920_add_final_map_by_discipline_report_menu ...... 3.87ms DONE
  2022_11_18_152921_add_function_report_annual_average_model1 .... 3.67ms DONE
  2022_11_20_152920_add_white_student_form_report_menu ........... 3.92ms DONE
  2022_11_20_152921_add_enrollment_quantitative_map_report_menu .. 3.86ms DONE
  2022_11_21_152921_add_student_card_report_menu ................. 6.20ms DONE
  2022_11_21_152922_add_class_board_map_report_menu .............. 3.92ms DONE
  2022_11_21_152925_add_minutes_final_result_report_menu ......... 3.74ms DONE
  2023_02_08_130000_add_function_report_discipline_registration_situation  1.96ms DONE
  2024_06_19_152929_add_abandonment_certificate_report_menu ...... 4.03ms DONE
  2024_06_19_184735_add_report_card_transference_menu ............ 3.93ms DONE
  2024_06_20_132925_add_audit_evaluations_faults_report_menu ..... 3.63ms DONE

Symbol link created in: /var/www/ieducar/ieducar/modules/Reports
Symbol link created in: /var/www/ieducar/ieducar/modules/Reports
Compiling reports files..
  abandonment-certificate
  age-distortion-in-serie
  audit-evaluations-faults
  birthdays
  children-education-attendance-list
  class-average-comparative
  class-board-map-landscape
  class-board-map-portrait
  class-record-book
  class-record-cover
  conceptual-landscape-report-card
  conceptual-report-card
  conclusion-certificate
  conference-evaluations-faults
  descriptive-opinion-report-card
  detailed-transportation-routes
  distribution-of-uniform-per-student
  drivers
  educational-progress-and-procedures-chart
  educational-progress-and-procedures
  elementary-school-exams-record
  employee-allocated-time
  enrollment-quantitative-map-course
  enrollment-quantitative-map-detailed
  enrollment-quantitative-map-school-grade-period
  enrollment-quantitative-map-school-grade
  enrollment-quantitative-map-school
  final-map-by-discipline-model1
  final-map-by-discipline-model2
  final-result-conceptual
  final-result-numeric
  final-situation
  frequency-certificate
  general-movement
  general-opinion-report-card
  header-landscape-listing
  header-landscape-report-card
  header-landscape
  header-portrait-history
  header-portrait-listing
  header-portrait-report-card
  header-portrait
  library-authors
  library-clients
  library-devolution-receipt-with-copy
  library-devolution-receipt
  library-devolutions
  library-loan-receipt-with-copy
  library-loan-receipt
  library-loans
  library-publishers
  library-works
  middle-school-attendance-list
  middle-school-exams-record
  minutes-final-result
  monthly-movement
  not-enrollment
  parent-signature
  parents-contact-notes
  pending-students
  registration-certificate
  registration-school
  report-card-transference
  report-card
  retake-tests-register
  scholar-subjects-and-objectives
  school-historic-eja-national-base-table
  school-history-crosstab-dataset
  school-history-crosstab
  school-history-early-years-scores-diversified
  school-history-early-years-scores
  school-history-early-years
  school-history-eja-scores-diversified
  school-history-eja-scores
  school-history-eja
  school-history-nine-years-extracurricular
  school-history-nine-years-transfer
  school-history-nine-years
  school-history-registration-tranfer-abscense
  school-history-registration-tranfer-common
  school-history-registration-tranfer-diversified
  school-history-series-years
  schooling-certificate
  schools
  score-absence-release
  servant-formation
  servant-professional-data
  servant-sheet-blank
  servant-sheet
  servants
  statistics
  student-card-model1
  student-card-model2
  student-card-model3
  student-disciplinary-occurrence
  student-sheet
  students-average
  students-entrance-and-allocation
  students-movement
  students-per-class
  students-per-projects
  students-transferred-abandonment
  students-with-benefits
  students-with-disabilities
  tags
  teacher-report-card-crosstab
  teacher-report-card-portrait-crosstab
  teacher-report-card-portrait
  teacher-report-card
  teachers-and-courses-taught-by-class
  teachers-per-schoolclass
  transference-certificate
  transportation-routes
  transportation-users
  user-access-graphic
  user-access
  vacancy-certificate
  white-student-form-model1
  white-student-form-model2

   INFO  Nothing to migrate.  

   INFO  Publishing [reports-assets] assets.  

  Copying directory [packages/portabilis/i-educar-reports-package/ieducar/Assets] to [public/vendor/legacy/Reports/Assets] ............ DONE

Minha interface do i-Educar esta assim:

image

Até realizei a abertura em uma guia anônima porém sem êxito

edineivaldameri commented 4 months ago

@msoares94 se já estava logado no i-Educar antes da instalação do pacote de relatórios tente executar um:

php artisan cache:clear

para ver se resolve o problema.

msoares94 commented 4 months ago

@edineivaldameri muito obrigado pela informação, a execução do comando resolveu o problema da exibição dos menus dos relatórios.