diff --git a/app/Helpers/MasterFunctionsHelper.php b/app/Helpers/MasterFunctionsHelper.php index b0109b0..668085a 100644 --- a/app/Helpers/MasterFunctionsHelper.php +++ b/app/Helpers/MasterFunctionsHelper.php @@ -11,7 +11,6 @@ use DateTime; class MasterFunctionsHelper { - public static function countDays($ganttId, $start, $end) { $dayOffs = VersionGantt::where('id', $ganttId)->first()->config_dayoff; @@ -70,9 +69,6 @@ class MasterFunctionsHelper $ganttId = $gantt['last_gantt_id']; } $gantt = VersionGantt::find($ganttId)->toArray(); - // foreach ($gantt as $key => $value) { - // Log::info('gantt '.$value.' index '.$key); - // } if (isset($gantt['calculation_type'])) { if ($gantt['calculation_type'] == 'simple') { // to do @@ -262,24 +258,6 @@ class MasterFunctionsHelper $totalACWP = isset($totalACWP) ? $totalACWP : 0; $totalBCWP = isset($totalBCWP) ? $totalBCWP : 0; foreach ($dataPlanM as $keyPlanM) { - // $sumVolPlan = DB::table(function ($query) use ($keyGantt) { - // $query->select('a.*') - // ->from('m_activity AS a') - // ->join('assign_material_to_activity as amta', 'amta.activity_id', '=', 'a.id') - // ->where('a.type_activity', 'task') - // ->where('a.bobot_planning', '>', 0) - // ->where('a.version_gantt_id', $keyGantt['id']) - // ->unionAll(function ($query) use ($keyGantt) { - // $query->select('a.*') - // ->from('m_activity AS a') - // ->join('assign_hr_to_activity as ahta', 'ahta.activity_id', '=', 'a.id') - // ->where('a.type_activity', 'task') - // ->where('a.bobot_planning', '>', 0) - // ->where('a.version_gantt_id', $keyGantt['id']); - // }) - // ->orderBy('id', 'asc'); - // }, 'subquery') - // ->sum('bobot_planning'); $sumVolPlan = DB::table('assign_material_to_activity') ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) ->where('activity_id', '=', $keyPlanM->id) @@ -288,19 +266,14 @@ class MasterFunctionsHelper if ($keyPlanM->duration) { $weekCount = $keyPlanM->duration / 7; $weeklyPlan = $weekCount >= 1 ? $sumVolPlan->ttl_qty_plan / $weekCount : $sumVolPlan->ttl_qty_plan / $weekCount / 7; - // $weeklyProgress = $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; $weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; // $bobotHari = $keyPlanM->bobot_planning / $keyPlanM->duration; } else { - // $weeklyProgress = 0; $weekCount = 1 / 7; $weeklyPlan = $weekCount >= 1 ? $sumVolPlan->ttl_qty_plan / $weekCount : $sumVolPlan->ttl_qty_plan / $weekCount / 7; - // $weeklyProgress = $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; $weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; } - // $weeklyPlan = $weekCount > 0 ? $keyPlanM->bobot_planning / $weekCount : 0; - // $weeklyProgress = $weeklyPlan * $keyPlanM->bobot_planning; $dataTempPlan[$x]['activity_id'] = $keyPlanM->id; $dataTempPlan[$x]['bobot_planning'] = $keyPlanM->bobot_planning; $dataTempPlan[$x]['ttl_plan'] = $sumVolPlan; @@ -349,27 +322,15 @@ class MasterFunctionsHelper ->orderBy('status_activity', 'ASC') ->first(); $dataTempReport[$w]['percentage'] = ($keyActualM->qty / $sumVolActual->ttl_qty_plan) * $keyActualM->bobot_planning; - // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; - // if($keyActualM->qty/$sumVolActual->ttl_qty_plan >= 1){ if ($checkStatusActivity->status_activity == 'done') { $sumPercentageActual += $keyActualM->bobot_planning / $reportCount; - // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; } else { if ($keyActualM->qty / $sumVolActual->ttl_qty_plan >= 1 || (int) $sumVolActual->ttl_qty_plan == (int) $sumReportActual) { $sumPercentageActual += (($keyActualM->qty / $sumVolActual->ttl_qty_plan) * $keyActualM->bobot_planning) * (95 / 100); - // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; } else { $sumPercentageActual += ($keyActualM->qty / $sumVolActual->ttl_qty_plan) * $keyActualM->bobot_planning; - // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; } } - // }else { - // if($checkStatusActivity->status_activity == 'done'){ - // $sumPercentageActual+=($keyActualM->qty/$keyActualM->qty)*$keyActualM->bobot_planning; - // }else{ - // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; - // } - // } $totalACWP += $keyActualM->duration > 0 ? $keyActualM->biaya_actual / $keyActualM->duration : 0; } catch (\DivisionByZeroError $e) { return response()->json(['message' => $e->getMessage()]); @@ -435,7 +396,6 @@ class MasterFunctionsHelper "percentage" => $tempPercentage, "percentagePlan" => $tempPercentagePlan, "percentageReal" => $tempPercentageReal, - "data_details" => $arr_ActualM, "budget_control" => array( "current_budget" => $totalRencanaBudget, "acwp" => round($totalACWP, 0), @@ -462,34 +422,24 @@ class MasterFunctionsHelper $dataFinal = []; $dataPayload = []; $dataPayload['period'] = 'week'; - $totalACWP = 0; - $totalBCWP = 0; - $tempPercentage = []; $dataProject = Project::find($keyGantt['proyek_id']); - $dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->first(); if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { $dataPayload['end_date'] = $dataProject->akhir_proyek; } - if ($dataHeader) { - // $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); - } else { - // $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); - } - if (!Activity::where("version_gantt_id", $keyGantt['id'])->first()) return $dataFinal; - $minDate = Activity::where('version_gantt_id', $keyGantt['id'])->whereNull('parent_id')->pluck('start_date')->first(); + $activityQueryBuilder = Activity::where('version_gantt_id', $keyGantt['id'])->whereNull('parent_id'); + $activityData = $activityQueryBuilder->first(); + $minDate = $activityQueryBuilder->pluck('start_date')->first(); $begin = new \DateTime($minDate); $begin = $begin->modify('-1 day'); if (isset($dataPayload['end_date'])) { $maxDate = $dataPayload['end_date']; $end = new \DateTime($maxDate . ' Friday'); - // $end->modify('next Friday'); - // $end->modify('next Friday'); /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged $interval = new \DateInterval('P1D'); } else { @@ -505,32 +455,20 @@ class MasterFunctionsHelper ->max("a.planned_end"); // plan date overlapped with assign_material_to_activity's, it should be m_activity' $maxDate = max(new \DateTime($plannedMaxDate), new \DateTime($actualMaxDate)); $end = new \DateTime($maxDate->format('Y-m-d') . ' Friday'); - // $end->modify('next Friday'); - // $end->modify('next Friday'); $interval = new \DateInterval('P1D'); } $period = new \DatePeriod($begin, $interval, $end); - // $arr_ActualM = []; $tempDate = []; - // $tempPercentagePlan = []; - // $tempPercentagePlanWhr = []; - // $tempPercentageReal = []; - // $tempTtlPercentPlan = 0; - // $tempTtlPercentActual = 0; - - // $currentACWP = 0; - // $currentBCWP = 0; $dataActivityPlanDate = []; $progressPlanKomulatifWeek = []; $progressActualKomulatifWeek = []; + $progressPlanBar = 0; $dateWeek = []; $tmpProgressPlanWeek = 0; $tmpProgressActualWeek = 0; foreach ($period as $dt) { $loopDay = $dt->format("Y-m-d"); - //new \Datetime($dt->format("Y-m-d")); - // $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); $tempDate[] = array($dt->format("Y-m-d")); $dataPlanM = DB::table('m_activity') @@ -561,22 +499,11 @@ class MasterFunctionsHelper $dataActivityPlan = []; $dataActivityActual = []; $today = date('Y-m-d'); - $statusCutOfDate = false; - // if (new \DateTime($loopDay) < $today) { - // $statusCutOfDate = true; - // } - $progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek, 2); - if ($loopDay <= $today) { - // $tempPercentageReal[] = round($tempTtlPercentActual, 2); - $progressActualKomulatifWeek[] += round($tmpProgressActualWeek, 2); - } $dateWeek[] = [$loopDay]; - // $progressPlanKomulatifWeek[] += $tmpProgressPlanWeek; + // loop per activity by day foreach ($dataPlanM as $keyPlanM) { # hitung untuk persentase progress planning - // if($keyPlanM->duration == 0){ - // $duration = 2; // Tanggal awal $startDate = new DateTime($keyPlanM->planned_start); // Tanggal akhir @@ -585,15 +512,6 @@ class MasterFunctionsHelper $interval = $startDate->diff($endDate); // Mengambil hasil selisih hari $duration = (int) $interval->days + 1; - // }else{ - // $duration = $keyPlanM->duration + 2; - // } - // $startPlan = new DateTime($keyPlanM->planned_start); - // $endPlan = new DateTime($keyPlanM->planned_end); - // $interval = $startPlan->diff($endPlan); - - // // Mengambil hasil selisih hari - // $duration = $interval->days; $progressPlanWeek = $keyPlanM->bobot_planning / $duration; $dataActivityPlan[] = array( 'progressPlanDay' => $progressPlanWeek, @@ -607,13 +525,11 @@ class MasterFunctionsHelper // hitung progress actual foreach ($dataActualM as $keyActualM) { # hitung untuk persentase progress actual - // $progressActualWeek = ((((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*100)*$keyActualM->bobot_planning)/100; // jika total report > dari planning if ($keyActualM->sum_qty_actual > $keyActualM->qty_plan) { $progressActualWeek = ($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * $keyActualM->bobot_planning; } else { // jika total report < dari planning - // $progressActualWeek = ((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*$keyActualM->bobot_planning; if ($keyActualM->qty_actual == 0) { $progressActualWeek = 0; } else { @@ -638,6 +554,18 @@ class MasterFunctionsHelper $tmpProgressActualWeek += $progressActualWeek; } + $progressPlanKomulatifWeek[] = round($tmpProgressPlanWeek, 2); + // loop cut off day + if ($loopDay <= $today) { + if(round($tmpProgressActualWeek, 2) > $activityData['persentase_progress']) { + $progressActualKomulatifWeek[] = $activityData['persentase_progress']; + } else { + $progressActualKomulatifWeek[] = round($tmpProgressActualWeek, 2); + } + // For Planning + $progressPlanBar = round($tmpProgressPlanWeek, 2); + } + $dataActivityPlanDate[] = array( "date" => $loopDay, "statusWeek" => new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday') ? true : false, @@ -649,331 +577,14 @@ class MasterFunctionsHelper } $dataFinal[] = array( - // "date" => $dateWeek, "proyek_name" => $dataProject->nama, "data" => [ "date" => $dateWeek, "percentagePlan" => $progressPlanKomulatifWeek, "percentageReal" => $progressActualKomulatifWeek, - "data_details" => $dataActivityPlanDate + "progressPlanToDay" => $progressPlanBar ], - - - "gantt" => $keyGantt - ); - - return $dataFinal; - } - - public function calculateSCurveVWahyu($projectId) - { - DB::enableQueryLog(); - - $dataFinal = []; - $dataPayload = []; - $dataPayload['period'] = 'week'; - $totalACWP = 0; - $totalBCWP = 0; - $tempPercentage = []; - - $dataProject = Project::find($projectId); - $dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $projectId)->first(); - if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { - $dataPayload['end_date'] = $dataProject->akhir_proyek; - } - - if ($dataHeader) { - $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $projectId)->sum("rencana_biaya"); - } else { - $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $projectId)->sum("rencana_biaya"); - } - - $alreadyHasReport = DB::table('report_activity_material as a') - ->select('a.id') - ->join('m_activity as b', 'b.id', '=', 'a.activity_id') - ->exists(); - - $minDate = $dataProject->mulai_proyek; - - $begin = new \DateTime($minDate . ' Monday'); - $begin->modify('last Monday'); - if (isset($dataPayload['end_date'])) { - $maxDate = $dataPayload['end_date']; - $end = new \DateTime($maxDate . ' Friday'); - $end->modify('next Friday'); - $end->modify('next Friday'); - /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged - $interval = new \DateInterval('P7D'); - } else { - // $maxDate = DB::table('assign_material_to_activity as ama') - // ->where("ama.proyek_id", $projectId) - // ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') - // ->max("plan_date"); // plan date overlapped with assign_material_to_activity's, it should be m_activity's - $maxDate = $dataProject->akhir_proyek; - $end = new \DateTime($maxDate); - $end->modify('next Friday'); - $end->modify('next Friday'); - $interval = new \DateInterval('P7D'); - } - $period = new \DatePeriod($begin, $interval, $end); - - $arr_ActualM = []; - $tempDate = []; - $tempPercentagePlan = []; - $tempPercentagePlanWhr = []; - $tempPercentageReal = []; - $tempTtlPercentPlan = 0; - $tempTtlPercentActual = 0; - - $currentACWP = 0; - $currentBCWP = 0; - - foreach ($period as $dt) { - $minSevenDays = new \Datetime($dt->format("Y-m-d")); - $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); - // $dataPlanM = DB::table('assign_material_to_activity as ama') - // ->select('ama.activity_id', 'ama.qty_planning', 'ama.plan_date', 'ama.start_activity', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress') - // ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') - // ->where('ama.proyek_id', '=', $keyGantt['proyek_id']) - // ->where('a.version_gantt_id', '=', $keyGantt['id']) - // ->whereDate('ama.plan_date', '<=',$dt->format("Y-m-d")) - // ->whereDate('ama.plan_date', '>', $minSevenDays) - // ->get(); - - $activities = DB::table('m_activity AS a') - ->join('assign_material_to_activity AS amta', 'amta.activity_id', '=', 'a.id') - ->where('a.type_activity', 'task') - ->where('a.bobot_planning', '>', 0) - ->where('a.proyek_id', '=', $projectId) - ->whereDate('amta.plan_date', '<=', $dt->format("Y-m-d")) - ->whereDate('amta.plan_date', '>', $minSevenDays) - ->select('a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress', 'a.id'); - - $dataPlanM = DB::table('m_activity AS a') - ->join('assign_hr_to_activity AS ahta', 'ahta.activity_id', '=', 'a.id') - ->where('a.type_activity', 'task') - ->where('a.bobot_planning', '>', 0) - ->where('a.proyek_id', '=', $projectId) - ->whereDate('a.start_date', '<=', $dt->format("Y-m-d")) - ->whereDate('a.start_date', '>', $minSevenDays) - ->select('a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress', 'a.id') - ->union($activities) - ->get(); - - $dataActualM = DB::table('report_activity_material as ram') - ->select('ram.activity_id', 'ram.qty', 'ram.report_date', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress') - ->join('m_activity as a', 'a.id', '=', 'ram.activity_id') - ->where('a.proyek_id', '=', $projectId) - ->whereDate('ram.report_date', '<=', $dt->format("Y-m-d")) - ->whereDate('ram.report_date', '>', $minSevenDays) - ->get(); - $dataTempPlan = []; - $x = 0; - $sumPercentagePlan = 0; - $totalACWP = isset($totalACWP) ? $totalACWP : 0; - $totalBCWP = isset($totalBCWP) ? $totalBCWP : 0; - - foreach ($dataPlanM as $keyPlanM) { - // $sumVolPlan = DB::table(function ($query) use ($projectId) { - // $query->select('a.*') - // ->from('m_activity AS a') - // ->join('assign_material_to_activity as amta', 'amta.activity_id', '=', 'a.id') - // ->where('a.type_activity', 'task') - // ->where('a.bobot_planning', '>', 0) - // ->where('a.proyek_id', $projectId) - // ->unionAll(function ($query) use ($projectId) { - // $query->select('a.*') - // ->from('m_activity AS a') - // ->join('assign_hr_to_activity as ahta', 'ahta.activity_id', '=', 'a.id') - // ->where('a.type_activity', 'task') - // ->where('a.bobot_planning', '>', 0) - // ->where('a.proyek_id', $projectId); - // })->orderBy('id', 'asc'); - // }, 'subquery') - // ->sum('bobot_planning'); - $sumVolPlan = DB::table('assign_material_to_activity') - ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) - ->where('activity_id', '=', $keyPlanM->id) - ->groupBy('activity_id') - ->first(); - $weekCount = $keyPlanM->duration / 7; - $weeklyPlan = $sumVolPlan->ttl_qty_plan / $weekCount; - $weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; - $dataTempPlan[$x]['activity_id'] = $keyPlanM->id; - $dataTempPlan[$x]['bobot_planning'] = $keyPlanM->bobot_planning; - $dataTempPlan[$x]['ttl_plan'] = $sumVolPlan; - $dataTempPlan[$x]['biaya_actual'] = $keyPlanM->biaya_actual; - $dataTempPlan[$x]['duration'] = $keyPlanM->duration; - $dataTempPlan[$x]['persentase_progress'] = $keyPlanM->persentase_progress; - try { - $dataTempPlan[$x]['percentage'] = $keyPlanM->bobot_planning; - $sumPercentagePlan += $weeklyProgress; - if (isset($keyPlanM->duration) && $keyPlanM->duration > 0) - $totalBCWP += (((($keyPlanM->persentase_progress * $keyPlanM->bobot_planning) / 100) / $keyPlanM->duration) * $totalRencanaBudget) / 100; - else - $totalBCWP = 0; - $dataTempPlan[$x]['totalBCWP'] = $totalBCWP; - } catch (\DivisionByZeroError $e) { - return response()->json(['message' => $e->getMessage()]); - } - $x++; - } - - $w = 0; - $dataTempReport = []; - $sumPercentageActual = 0; - foreach ($dataActualM as $keyActualM) { - $sumVolActual = DB::table('assign_material_to_activity') - ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) - ->where('activity_id', '=', $keyActualM->activity_id) - ->groupBy('activity_id') - ->first(); - if (!isset($sumVolActual)) { - $sumVolActual = (object) [ - 'activity_id' => $keyActualM->activity_id, - 'ttl_qty_plan' => "0" - ]; - } - $sumReportActual = DB::table('report_activity_material') - ->where('activity_id', $keyActualM->activity_id) - ->sum('qty'); - $reportCount = DB::table('report_activity_material')->where('activity_id', '=', $keyActualM->activity_id)->count(); - $dataTempReport[$w]['activity_id'] = $keyActualM->activity_id; - $dataTempReport[$w]['qty'] = $keyActualM->qty; - $dataTempReport[$w]['report_date'] = $keyActualM->report_date; - $dataTempReport[$w]['bobot_planning'] = $keyActualM->bobot_planning; - $dataTempReport[$w]['ttl_plan'] = $sumVolActual->ttl_qty_plan; - $dataTempReport[$w]['biaya_actual'] = $keyActualM->biaya_actual; - $dataTempReport[$w]['duration'] = $keyActualM->duration; - $dataTempReport[$w]['persentase_progress'] = $keyActualM->persentase_progress; - try { - // assign_material_to_activity - $checkStatusActivity = DB::table('assign_material_to_activity') - ->select('activity_id', 'status_activity') - ->where('activity_id', '=', $keyActualM->activity_id) - ->orderBy('status_activity', 'ASC') - ->first(); - if (!isset($checkStatusActivity)) { - $checkStatusActivity = (object) [ - 'activity_id' => $keyActualM->activity_id, - 'status_activity' => 'open' - ]; - } - if ($sumVolActual->ttl_qty_plan == "0") { - $actual = 0; - } else { - $actual = $keyActualM->qty / $sumVolActual->ttl_qty_plan; - } - $dataTempReport[$w]['percentage'] = $actual * $keyActualM->bobot_planning; - // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; - // if($keyActualM->qty/$sumVolActual->ttl_qty_plan >= 1){ - if ($checkStatusActivity->status_activity == 'done') { - $sumPercentageActual += $keyActualM->bobot_planning / $reportCount; - // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; - } else { - if ($actual >= 1 || (int) $sumVolActual->ttl_qty_plan == (int) $sumReportActual) { - $sumPercentageActual += ($actual * $keyActualM->bobot_planning) * (95 / 100); - // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; - } else { - $sumPercentageActual += $actual * $keyActualM->bobot_planning; - // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; - } - } - // }else { - // if($checkStatusActivity->status_activity == 'done'){ - // $sumPercentageActual+=($keyActualM->qty/$keyActualM->qty)*$keyActualM->bobot_planning; - // }else{ - // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; - // } - // } - - - $totalACWP += $keyActualM->duration > 0 ? $keyActualM->biaya_actual / $keyActualM->duration : 0; - } catch (\DivisionByZeroError $e) { - return response()->json(['message' => $e->getMessage()]); - } - $dataTempReport[$w]['totalacwp'] = $totalACWP; - $w++; - } - - $arr_ActualM[] = array( - 'date' => $dt->format("Y-m-d"), - 'percentPlan' => $sumPercentagePlan, - 'percentActual' => $sumPercentageActual, - 'plan' => $dataTempPlan, - 'actual' => $dataTempReport, - ); - if (isset($dataPayload['period']) && $dataPayload['period'] == 'week') { - $tempTtlPercentPlan += $sumPercentagePlan; - $tempTtlPercentActual += $sumPercentageActual; - // todo - // if ($tempTtlPercentPlan >= 100) - // $tempTtlPercentPlan = 100; - - $currentACWP += $totalACWP; - $currentBCWP += $totalBCWP; - - $tempPercentage[] = array(round($tempTtlPercentPlan, 2), round($tempTtlPercentActual, 2)); - $tempPercentagePlan[] = round($tempTtlPercentPlan, 2); - $tempPercentagePlanWhr[] = ["weekly period", $tempPercentagePlan]; - $tempPercentageReal[] = round($tempTtlPercentActual, 2); - if ($tempTtlPercentPlan >= 100 && $tempTtlPercentActual >= 100) { - break; - } - } else { - $tempPercentage[] = array(round($sumPercentagePlan, 2), round($sumPercentageActual, 2)); - $tempPercentagePlan[] = round($sumPercentagePlan, 2); - $tempPercentageReal[] = round($sumPercentageActual, 2); - } - $tempDate[] = array($dt->format("Y-m-d")); - } - - try { - if (round($totalACWP, 0) > $totalRencanaBudget) { - $estimatedCost = round($totalACWP, 0) + 0; - } else { - $estimatedCost = ($totalRencanaBudget + 0); - } - } catch (\DivisionByZeroError $e) { - return response()->json([ - 'message' => $e->getMessage(), - "line" => 566, - ]); - } - $estimatedCost = $totalACWP > $totalRencanaBudget ? $totalACWP : $totalRencanaBudget; - - $costDeviation = $totalRencanaBudget - $estimatedCost; - if ($costDeviation > 0) { - $potential = "SAVING"; - } else { - $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; - } - - $lastReal = $tempPercentageReal[count($tempPercentageReal) - 1]; - $totalBCWP = $lastReal * $dataProject->rencana_biaya / 100; - $dataResponse = array( - "date" => $tempDate, - "percentage" => $tempPercentage, - "percentagePlan" => $tempPercentagePlan, - "percentageReal" => $tempPercentageReal, - "data_details" => $arr_ActualM, - "budget_control" => array( - "current_budget" => $totalRencanaBudget, - "acwp" => round($totalACWP, 0), - "bcwp" => round($totalBCWP, 0), - "rem_to_complete" => ($totalRencanaBudget - round($totalACWP, 0)), - "add_cost_to_complete" => 0, - "estimated_at_completion" => $estimatedCost, - "cost_deviation" => $costDeviation, - "potential" => $potential, - ) - ); - - $dataFinal[] = array( - "proyek_name" => $dataProject->nama, - "data" => $dataResponse, ); - return $dataFinal; } @@ -984,8 +595,6 @@ class MasterFunctionsHelper $dataFinal = []; $dataPayload = []; $dataPayload['period'] = 'week'; - // $totalACWP = 0; - // $totalBCWP = 0; $tempPercentage = []; $dataProject = Project::find($projectId); @@ -1000,11 +609,6 @@ class MasterFunctionsHelper $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $projectId)->sum("rencana_biaya"); } - // $alreadyHasReport = DB::table('report_activity_material as a') - // ->select('a.id') - // ->join('m_activity as b', 'b.id', '=', 'a.activity_id') - // ->exists(); - $minDate = $dataProject->mulai_proyek; $begin = new \DateTime($minDate); @@ -1013,14 +617,9 @@ class MasterFunctionsHelper $maxDate = $dataPayload['end_date']; $end = new \DateTime($maxDate . ' Friday'); $end->modify('next Friday'); - // $end->modify('next Friday'); /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged $interval = new \DateInterval('P7D'); } else { - // $maxDate = DB::table('assign_material_to_activity as ama') - // ->where("ama.proyek_id", $projectId) - // ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') - // ->max("plan_date"); // plan date overlapped with assign_material_to_activity's, it should be m_activity's $maxDate = $dataProject->akhir_proyek; $end = new \DateTime($maxDate); $end->modify('next Friday'); @@ -1037,20 +636,9 @@ class MasterFunctionsHelper $tempTtlPercentPlan = 0; $tempTtlPercentActual = 0; - // $currentACWP = 0; - // $currentBCWP = 0; - foreach ($period as $dt) { $minSevenDays = new \Datetime($dt->format("Y-m-d")); $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); - // $dataPlanM = DB::table('assign_material_to_activity as ama') - // ->select('ama.activity_id', 'ama.qty_planning', 'ama.plan_date', 'ama.start_activity', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress') - // ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') - // ->where('ama.proyek_id', '=', $keyGantt['proyek_id']) - // ->where('a.version_gantt_id', '=', $keyGantt['id']) - // ->whereDate('ama.plan_date', '<=',$dt->format("Y-m-d")) - // ->whereDate('ama.plan_date', '>', $minSevenDays) - // ->get(); $activities = DB::table('m_activity AS a') ->join('assign_material_to_activity AS amta', 'amta.activity_id', '=', 'a.id') @@ -1082,27 +670,8 @@ class MasterFunctionsHelper $dataTempPlan = []; $x = 0; $sumPercentagePlan = 0; - // $totalACWP = isset($totalACWP) ? $totalACWP : 0; - // $totalBCWP = isset($totalBCWP) ? $totalBCWP : 0; foreach ($dataPlanM as $keyPlanM) { - // $sumVolPlan = DB::table(function ($query) use ($projectId) { - // $query->select('a.*') - // ->from('m_activity AS a') - // ->join('assign_material_to_activity as amta', 'amta.activity_id', '=', 'a.id') - // ->where('a.type_activity', 'task') - // ->where('a.bobot_planning', '>', 0) - // ->where('a.proyek_id', $projectId) - // ->unionAll(function ($query) use ($projectId) { - // $query->select('a.*') - // ->from('m_activity AS a') - // ->join('assign_hr_to_activity as ahta', 'ahta.activity_id', '=', 'a.id') - // ->where('a.type_activity', 'task') - // ->where('a.bobot_planning', '>', 0) - // ->where('a.proyek_id', $projectId); - // })->orderBy('id', 'asc'); - // }, 'subquery') - // ->sum('bobot_planning'); $sumVolPlan = DB::table('assign_material_to_activity') ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) ->where('activity_id', '=', $keyPlanM->id) @@ -1112,19 +681,14 @@ class MasterFunctionsHelper if ($keyPlanM->duration) { $weekCount = $keyPlanM->duration / 7; $weeklyPlan = $weekCount >= 1 ? $sumVolPlan->ttl_qty_plan / $weekCount : $sumVolPlan->ttl_qty_plan / $weekCount / 7; - // $weeklyProgress = $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; $weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; // $bobotHari = $keyPlanM->bobot_planning / $keyPlanM->duration; } else { - // $weeklyProgress = 0; $weekCount = 1 / 7; $weeklyPlan = $weekCount >= 1 ? $sumVolPlan->ttl_qty_plan / $weekCount : $sumVolPlan->ttl_qty_plan / $weekCount / 7; - // $weeklyProgress = $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; $weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; } - // $weeklyPlan = $sumVolPlan->ttl_qty_plan / $weekCount; - // $weeklyProgress = 80; $dataTempPlan[$x]['activity_id'] = $keyPlanM->id; $dataTempPlan[$x]['bobot_planning'] = $keyPlanM->bobot_planning; $dataTempPlan[$x]['ttl_plan'] = $sumVolPlan; @@ -1134,11 +698,6 @@ class MasterFunctionsHelper try { $dataTempPlan[$x]['percentage'] = $keyPlanM->bobot_planning; $sumPercentagePlan += $weeklyProgress; - // if (isset($keyPlanM->duration) && $keyPlanM->duration > 0) - // $totalBCWP += (((($keyPlanM->persentase_progress * $keyPlanM->bobot_planning) / 100) / $keyPlanM->duration) * $totalRencanaBudget) / 100; - // else - // $totalBCWP = 0; - // $dataTempPlan[$x]['totalBCWP'] = $totalBCWP; } catch (\DivisionByZeroError $e) { return response()->json(['message' => $e->getMessage()]); } @@ -1191,34 +750,18 @@ class MasterFunctionsHelper $actual = $keyActualM->qty / $sumVolActual->ttl_qty_plan; } $dataTempReport[$w]['percentage'] = $actual * $keyActualM->bobot_planning; - // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; - // if($keyActualM->qty/$sumVolActual->ttl_qty_plan >= 1){ if ($checkStatusActivity->status_activity == 'done') { $sumPercentageActual += $keyActualM->bobot_planning / $reportCount; - // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; } else { if ($actual >= 1 || (int) $sumVolActual->ttl_qty_plan == (int) $sumReportActual) { $sumPercentageActual += ($actual * $keyActualM->bobot_planning) * (95 / 100); - // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; } else { $sumPercentageActual += $actual * $keyActualM->bobot_planning; - // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; } } - // }else { - // if($checkStatusActivity->status_activity == 'done'){ - // $sumPercentageActual+=($keyActualM->qty/$keyActualM->qty)*$keyActualM->bobot_planning; - // }else{ - // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; - // } - // } - - - // $totalACWP += $keyActualM->duration > 0 ? $keyActualM->biaya_actual / $keyActualM->duration : 0; } catch (\DivisionByZeroError $e) { return response()->json(['message' => $e->getMessage()]); } - // $dataTempReport[$w]['totalacwp'] = $totalACWP; $w++; } @@ -1235,22 +778,12 @@ class MasterFunctionsHelper if (isset($dataPayload['period']) && $dataPayload['period'] == 'week') { $tempTtlPercentPlan += $sumPercentagePlan; $tempTtlPercentActual += $sumPercentageActual; - // todo - // if ($tempTtlPercentPlan >= 100) - // $tempTtlPercentPlan = 100; - - // $currentACWP += $totalACWP; - // $currentBCWP += $totalBCWP; - $tempPercentage[] = array(round($tempTtlPercentPlan, 2), round($tempTtlPercentActual, 2)); $tempPercentagePlan[] = round($tempTtlPercentPlan, 2); $tempPercentagePlanWhr[] = ["weekly period", $tempPercentagePlan]; if ($date < $today) { $tempPercentageReal[] = round($tempTtlPercentActual, 2); } - // if ($tempTtlPercentPlan >= 100 && $tempTtlPercentActual >= 100) { - // break; - // } } else { $tempPercentage[] = array(round($sumPercentagePlan, 2), round($sumPercentageActual, 2)); $tempPercentagePlan[] = round($sumPercentagePlan, 2); @@ -1261,50 +794,14 @@ class MasterFunctionsHelper $tempDate[] = array($dt->format("Y-m-d")); } - // try { - // if (round($totalACWP, 0) > $totalRencanaBudget) { - // $estimatedCost = round($totalACWP, 0) + 0; - // } else { - // $estimatedCost = ($totalRencanaBudget + 0); - // } - // } catch (\DivisionByZeroError $e) { - // return response()->json([ - // 'message' => $e->getMessage(), - // "line" => 566, - // ]); - // } - // $estimatedCost = $totalACWP > $totalRencanaBudget ? $totalACWP : $totalRencanaBudget; - - // $costDeviation = $totalRencanaBudget - $estimatedCost; - // if ($costDeviation > 0) { - // $potential = "SAVING"; - // } else { - // $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; - // } - - // $lastReal = $tempPercentageReal[count($tempPercentageReal) - 1]; - // $lastReal = $tempPercentageReal[count($tempPercentageReal) < 1 ? count($tempPercentageReal) : count($tempPercentageReal) - 1]; - // $totalBCWP = $lastReal * $dataProject->rencana_biaya / 100; $dataResponse = array( "date" => $tempDate, "start" => $minDate, "begin" => $begin, - // "periode" => $period, "end" => $end, "percentage" => $tempPercentage, "percentagePlan" => $tempPercentagePlan, "percentageReal" => $tempPercentageReal, - // "data_details" => $arr_ActualM, - // "budget_control" => array( - // "current_budget" => $totalRencanaBudget, - // "acwp" => round($totalACWP, 0), - // "bcwp" => round($totalBCWP, 0), - // "rem_to_complete" => ($totalRencanaBudget - round($totalACWP, 0)), - // "add_cost_to_complete" => 0, - // "estimated_at_completion" => $estimatedCost, - // "cost_deviation" => $costDeviation, - // "potential" => $potential, - // ) ); $dataFinal[] = array( @@ -1319,34 +816,15 @@ class MasterFunctionsHelper { DB::enableQueryLog(); - // $hierarchyGantts = []; - // if (isset($hierarchyId)) { - // $hierarchy = HierarchyFtth::findOrFail($hierarchyId); - // $projectId = $hierarchy->project_id; - // // if (isset($hierarchy)) { - // // $hierarchyGantts = VersionGantt::where('hierarchy_ftth_id', $hierarchyId)->get()->toArray(); - // // } - // } - $dataFinal = []; $dataPayload = []; $dataPayload['period'] = 'week'; - $totalACWP = 0; - $totalBCWP = 0; - $tempPercentage = []; $dataProject = Project::find($projectId); - $dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $projectId)->first(); if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { $dataPayload['end_date'] = $dataProject->akhir_proyek; } - if ($dataHeader) { - // $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $projectId)->sum("rencana_biaya"); - } else { - // $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $projectId)->sum("rencana_biaya"); - } - $minDate = $dataProject->mulai_proyek; $begin = new \DateTime($minDate); @@ -1354,30 +832,15 @@ class MasterFunctionsHelper if (isset($dataPayload['end_date'])) { $maxDate = $dataPayload['end_date']; $end = new \DateTime($maxDate . ' Friday'); - // $end->modify('next Friday'); - // $end->modify('next Friday'); - /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged $interval = new \DateInterval('P1D'); } else { $maxDate = $dataProject->akhir_proyek; $end = new \DateTime($maxDate); $end = new \DateTime($end->format('Y-m-d') . ' Friday'); - // $end->modify('next Friday'); - // $end->modify('next Friday'); $interval = new \DateInterval('P1D'); } $period = new \DatePeriod($begin, $interval, $end); - - // $arr_ActualM = []; $tempDate = []; - // $tempPercentagePlan = []; - // $tempPercentagePlanWhr = []; - // $tempPercentageReal = []; - // $tempTtlPercentPlan = 0; - // $tempTtlPercentActual = 0; - - // $currentACWP = 0; - // $currentBCWP = 0; $dataActivityPlanDate = []; $progressPlanKomulatifWeek = []; $progressActualKomulatifWeek = []; @@ -1386,35 +849,9 @@ class MasterFunctionsHelper $tmpProgressActualWeek = 0; foreach ($period as $dt) { $loopDay = $dt->format("Y-m-d"); - //new \Datetime($dt->format("Y-m-d")); - // $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); $tempDate[] = array($dt->format("Y-m-d")); $dataPlanM = []; $dataActualM = []; - // if (count($hierarchyGantts) > 0) { - // foreach ($hierarchyGantts as $key => $gantt) { - // $dataPlanM[] = DB::table('m_activity') - // ->where('type_activity', 'task') - // ->where('bobot_planning', '>', 0) - // ->where('version_gantt_id', $gantt['id']) - // ->whereDate('planned_start', '<=', $loopDay) - // ->whereDate('planned_end', '>=', $loopDay) - // ->select('name', 'bobot_planning', 'biaya_actual', 'duration', 'persentase_progress', 'id', 'planned_start', 'planned_end') - // ->get()->toArray(); - - // $dataActualM[] = DB::table('report_activity_material as ram') - // ->join('m_activity as ma', 'ma.id', '=', 'ram.activity_id') - // ->select('ram.activity_id', 'ram.qty as qty_actual', 'ma.bobot_planning', 'ma.name', - // DB::raw('(SELECT SUM(amta.qty_planning) FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS qty_plan'), - // DB::raw('(SELECT SUM(ram.qty) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS sum_qty_actual'), - // DB::raw('(SELECT DISTINCT status_activity FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS status_activity'), - // DB::raw('(SELECT COUNT(id) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS count_report') - // ) - // ->where('ram.report_date', $loopDay) - // ->where('ma.version_gantt_id', $gantt['id']) - // ->get()->toArray(); - // } - // } else { $dataPlanM = DB::table('m_activity') ->where('type_activity', 'task') @@ -1440,24 +877,15 @@ class MasterFunctionsHelper ->where('ram.report_date', $loopDay) ->where('ma.proyek_id', $projectId) ->get(); - // } $dataActivityPlan = []; $dataActivityActual = []; $today = date('Y-m-d'); - $progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek, 2); - if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) { - // $tempPercentageReal[] = round($tempTtlPercentActual, 2); - $progressActualKomulatifWeek[] += round($tmpProgressActualWeek, 2); - } + // Hitung Plan $dateWeek[] = [$loopDay]; - // $progressPlanKomulatifWeek[] += $tmpProgressPlanWeek; - // if (count($dataPlanM) > 0 && count($dataPlanM[0]) > 0) { foreach ($dataPlanM as $keyPlanM) { # hitung untuk persentase progress planning - // if($keyPlanM->duration == 0){ - // $duration = 2; // Tanggal awal $startDate = new DateTime($keyPlanM->planned_start); // Tanggal akhir @@ -1466,16 +894,7 @@ class MasterFunctionsHelper $interval = $startDate->diff($endDate); // Mengambil hasil selisih hari $duration = (int) $interval->days + 1; - // }else{ - // $duration = $keyPlanM->duration + 2; - // } - // $startPlan = new DateTime($keyPlanM->planned_start); - // $endPlan = new DateTime($keyPlanM->planned_end); - // $interval = $startPlan->diff($endPlan); - - // // Mengambil hasil selisih hari - // $duration = $interval->days; - // 2023-07-26 + $progressPlanWeek = $keyPlanM->bobot_planning / $duration; $dataActivityPlan[] = array( 'progressPlanDay' => $progressPlanWeek, @@ -1485,19 +904,15 @@ class MasterFunctionsHelper ); $tmpProgressPlanWeek += $progressPlanWeek; } - // } // hitung progress actual - // if (count($dataActualM) > 0 && count($dataActualM[0]) > 0) { foreach ($dataActualM as $keyActualM) { # hitung untuk persentase progress actual - // $progressActualWeek = ((((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*100)*$keyActualM->bobot_planning)/100; // jika total report > dari planning if ($keyActualM->sum_qty_actual > $keyActualM->qty_plan) { $progressActualWeek = (($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) * $keyActualM->bobot_planning / 100; } else { // jika total report < dari planning - // $progressActualWeek = ((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*$keyActualM->bobot_planning; if ($keyActualM->qty_actual == 0) { $progressActualWeek = 0; } else { @@ -1505,19 +920,7 @@ class MasterFunctionsHelper } } if ($keyActualM->status_activity == 'done') { - // if($keyActualM->sum_qty_actual > $keyActualM->qty_plan){ - - // } - // if($progressActualWeek > $keyActualM->bobot_planning){ - // $progressActualWeek = $keyActualM->bobot_planning; - // }else if($keyActualM->qty_actual == 0){ - // $progressActualWeek = $keyActualM->bobot_planning; - // }else if($keyActualM->qty_plan == $keyActualM->sum_qty_actual){ $progressActualWeek = $keyActualM->bobot_planning / $keyActualM->count_report; - // }else { - // $progressActualWeek = $progressActualWeek; - // } - // $progressActualWeek = $progressActualWeek > $keyActualM->bobot_planning ? $keyActualM->bobot_planning : $progressActualWeek; // jika report lebih dari 1 x, maka harusnya di bagi sabanyak jumlah report, // contoh ada 3 report, report ke 1 adalah 5 maka 100/3 dan di looping } else { @@ -1535,7 +938,11 @@ class MasterFunctionsHelper $tmpProgressActualWeek += $progressActualWeek; } - // } + + $progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek, 2); + if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) { + $progressActualKomulatifWeek[] += round($tmpProgressActualWeek, 2); + } $dataActivityPlanDate[] = array( "date" => $loopDay, @@ -1548,13 +955,11 @@ class MasterFunctionsHelper } $dataFinal[] = array( - // "date" => $dateWeek, "proyek_name" => $dataProject->nama, "data" => [ "date" => $dateWeek, "percentagePlan" => $progressPlanKomulatifWeek, "percentageReal" => $progressActualKomulatifWeek - // "data_details" => $dataActivityPlanDate ] ); @@ -1563,261 +968,10 @@ class MasterFunctionsHelper public function calculateSCurveForProgressTree($hierarchyId) { - DB::enableQueryLog(); - - // $hierarchyGantts = []; - if (isset($hierarchyId)) { - $hierarchy = HierarchyFtth::findOrFail($hierarchyId); - $projectId = $hierarchy->project_id; - // if (isset($hierarchy)) { - // $hierarchyGantts = VersionGantt::where('hierarchy_ftth_id', $hierarchyId)->get()->toArray(); - // } - } - - $dataFinal = []; - $dataPayload = []; - $dataPayload['period'] = 'week'; - $totalACWP = 0; - $totalBCWP = 0; - $tempPercentage = []; - - $dataProject = Project::find($projectId); - $dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $projectId)->first(); - if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { - $dataPayload['end_date'] = $dataProject->akhir_proyek; - } - - if ($dataHeader) { - // $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $projectId)->sum("rencana_biaya"); - } else { - // $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $projectId)->sum("rencana_biaya"); - } - - $minDate = $dataProject->mulai_proyek; - - $begin = new \DateTime($minDate); - $begin = $begin->modify('-1 day'); - if (isset($dataPayload['end_date'])) { - $maxDate = $dataPayload['end_date']; - $end = new \DateTime($maxDate . ' Friday'); - // $end->modify('next Friday'); - // $end->modify('next Friday'); - /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged - $interval = new \DateInterval('P1D'); - } else { - $maxDate = $dataProject->akhir_proyek; - $end = new \DateTime($maxDate); - $end = new \DateTime($end->format('Y-m-d') . ' Friday'); - // $end->modify('next Friday'); - // $end->modify('next Friday'); - $interval = new \DateInterval('P1D'); - } - $period = new \DatePeriod($begin, $interval, $end); - - // $arr_ActualM = []; - $tempDate = []; - // $tempPercentagePlan = []; - // $tempPercentagePlanWhr = []; - // $tempPercentageReal = []; - // $tempTtlPercentPlan = 0; - // $tempTtlPercentActual = 0; - - // $currentACWP = 0; - // $currentBCWP = 0; - $dataActivityPlanDate = []; - $progressPlanKomulatifWeek = []; - $progressActualKomulatifWeek = []; - $dateWeek = []; - $tmpProgressPlanWeek = 0; - $tmpProgressActualWeek = 0; - foreach ($period as $dt) { - $loopDay = $dt->format("Y-m-d"); - //new \Datetime($dt->format("Y-m-d")); - // $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); - $tempDate[] = array($dt->format("Y-m-d")); - $dataPlanM = []; - $dataActualM = []; - // if (count($hierarchyGantts) > 0) { - // foreach ($hierarchyGantts as $key => $gantt) { - // $dataPlanM[] = DB::table('m_activity') - // ->where('type_activity', 'task') - // ->where('bobot_planning', '>', 0) - // ->where('version_gantt_id', $gantt['id']) - // ->whereDate('planned_start', '<=', $loopDay) - // ->whereDate('planned_end', '>=', $loopDay) - // ->select('name', 'bobot_planning', 'biaya_actual', 'duration', 'persentase_progress', 'id', 'planned_start', 'planned_end') - // ->get()->toArray(); - - // $dataActualM[] = DB::table('report_activity_material as ram') - // ->join('m_activity as ma', 'ma.id', '=', 'ram.activity_id') - // ->select('ram.activity_id', 'ram.qty as qty_actual', 'ma.bobot_planning', 'ma.name', - // DB::raw('(SELECT SUM(amta.qty_planning) FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS qty_plan'), - // DB::raw('(SELECT SUM(ram.qty) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS sum_qty_actual'), - // DB::raw('(SELECT DISTINCT status_activity FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS status_activity'), - // DB::raw('(SELECT COUNT(id) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS count_report') - // ) - // ->where('ram.report_date', $loopDay) - // ->where('ma.version_gantt_id', $gantt['id']) - // ->get()->toArray(); - // } - // } else { - - $dataPlanM = DB::table('m_hierarchy_ftth as mhf') - ->join('m_version_gantt as mvg', 'mvg.hierarchy_ftth_id', '=', 'mhf.id') - ->join('m_activity as ma', 'ma.version_gantt_id', '=', 'mvg.id') - ->where('ma.type_activity', 'task') - ->where('ma.bobot_planning', '>', 0) - ->where('mhf.project_id', $projectId) - ->whereDate('planned_start', '<=', $loopDay) - ->whereDate('planned_end', '>=', $loopDay) - ->select('ma.name', 'ma.bobot_planning', 'ma.biaya_actual', 'ma.duration', 'ma.persentase_progress', 'ma.id', 'ma.planned_start', 'ma.planned_end') - ->get(); - - $dataActualM = DB::table('m_hierarchy_ftth as mhf') - ->join('m_version_gantt as mvg', 'mvg.hierarchy_ftth_id', '=', 'mhf.id') - ->join('m_activity as ma', 'ma.version_gantt_id', '=', 'mvg.id') - ->join('report_activity_material as ram', 'ram.activity_id', '=', 'ma.id') - ->select( - 'ram.activity_id', - 'ram.qty as qty_actual', - 'ma.bobot_planning', - 'ma.name', - DB::raw('(SELECT SUM(amta.qty_planning) FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS qty_plan'), - DB::raw('(SELECT SUM(ram.qty) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS sum_qty_actual'), - DB::raw('(SELECT DISTINCT status_activity FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS status_activity'), - DB::raw('(SELECT COUNT(id) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS count_report') - ) - ->where('ram.report_date', $loopDay) - // ->where('ma.proyek_id', $projectId) - ->where('mhf.project_id', $projectId) - ->get(); - // } - - $dataActivityPlan = []; - $dataActivityActual = []; - $today = date('Y-m-d'); - if (new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday')) { - - $progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek, 2); - if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) { - // $tempPercentageReal[] = round($tempTtlPercentActual, 2); - $progressActualKomulatifWeek[] += round($tmpProgressActualWeek, 2); - } - $dateWeek[] = [$loopDay]; - } - // $progressPlanKomulatifWeek[] += $tmpProgressPlanWeek; - // if (count($dataPlanM) > 0 && count($dataPlanM[0]) > 0) { - foreach ($dataPlanM as $keyPlanM) { - # hitung untuk persentase progress planning - // if($keyPlanM->duration == 0){ - // $duration = 2; - // Tanggal awal - if (count($keyPlanM) == 0) { - continue; - } - $startDate = new DateTime($keyPlanM->planned_start); - // Tanggal akhir - $endDate = new DateTime($keyPlanM->planned_end); - // Menghitung selisih hari - $interval = $startDate->diff($endDate); - // Mengambil hasil selisih hari - $duration = (int) $interval->days + 1; - // }else{ - // $duration = $keyPlanM->duration + 2; - // } - // $startPlan = new DateTime($keyPlanM->planned_start); - // $endPlan = new DateTime($keyPlanM->planned_end); - // $interval = $startPlan->diff($endPlan); - - // // Mengambil hasil selisih hari - // $duration = $interval->days; - // 2023-07-26 - $progressPlanWeek = $keyPlanM->bobot_planning / $duration; - $dataActivityPlan[] = array( - 'progressPlanDay' => $progressPlanWeek, - 'name' => $keyPlanM->name, - 'bobot_p' => $keyPlanM->bobot_planning, - 'duration' => $keyPlanM->duration - ); - $tmpProgressPlanWeek += $progressPlanWeek; - } - // } - - // hitung progress actual - // if (count($dataActualM) > 0 && count($dataActualM[0]) > 0) { - foreach ($dataActualM as $keyActualM) { - if (count($keyPlanM) == 0) { - continue; - } - # hitung untuk persentase progress actual - // $progressActualWeek = ((((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*100)*$keyActualM->bobot_planning)/100; - // jika total report > dari planning - if ($keyActualM->sum_qty_actual > $keyActualM->qty_plan) { - $progressActualWeek = (($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) * $keyActualM->bobot_planning / 100; - } else { - // jika total report < dari planning - // $progressActualWeek = ((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*$keyActualM->bobot_planning; - if ($keyActualM->qty_actual == 0) { - $progressActualWeek = 0; - } else { - $progressActualWeek = ($keyActualM->qty_actual / $keyActualM->qty_plan) * $keyActualM->bobot_planning; - } - } - if ($keyActualM->status_activity == 'done') { - // if($keyActualM->sum_qty_actual > $keyActualM->qty_plan){ - - // } - // if($progressActualWeek > $keyActualM->bobot_planning){ - // $progressActualWeek = $keyActualM->bobot_planning; - // }else if($keyActualM->qty_actual == 0){ - // $progressActualWeek = $keyActualM->bobot_planning; - // }else if($keyActualM->qty_plan == $keyActualM->sum_qty_actual){ - $progressActualWeek = $keyActualM->bobot_planning / $keyActualM->count_report; - // }else { - // $progressActualWeek = $progressActualWeek; - // } - // $progressActualWeek = $progressActualWeek > $keyActualM->bobot_planning ? $keyActualM->bobot_planning : $progressActualWeek; - // jika report lebih dari 1 x, maka harusnya di bagi sabanyak jumlah report, - // contoh ada 3 report, report ke 1 adalah 5 maka 100/3 dan di looping - } else { - $progressActualWeek = $progressActualWeek > ($keyActualM->bobot_planning * 95) / 100 ? ($keyActualM->bobot_planning * 95) / 100 : $progressActualWeek; - } - $dataActivityActual[] = array( - 'progressActualDay' => $progressActualWeek, - 'qty_act' => $keyActualM->qty_actual, - 'bobot_p' => $keyActualM->bobot_planning, - 'qty_plan' => $keyActualM->qty_plan, - 'status_activity' => $keyActualM->status_activity, - 'sum_qty_actual' => $keyActualM->sum_qty_actual, - 'name' => $keyActualM->name - ); - - $tmpProgressActualWeek += $progressActualWeek; - } - // } - - $dataActivityPlanDate[] = array( - "date" => $loopDay, - "statusWeek" => new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday') ? true : false, - "activity-plan" => $dataActivityPlan, - "activity-actual" => $dataActivityActual, - "tmpProgressActualWeek" => $tmpProgressActualWeek, - "progressPlanWeek" => $tmpProgressPlanWeek - ); - } - - $dataFinal[] = array( - // "date" => $dateWeek, - "proyek_name" => $dataProject->nama, - "data" => [ - "date" => $dateWeek, - "percentagePlan" => $progressPlanKomulatifWeek, - "percentageReal" => $progressActualKomulatifWeek - // "data_details" => $dataActivityPlanDate - ] - ); - - return $dataFinal; + $hierarchy = HierarchyFtth::findOrFail($hierarchyId); + $averageProgress = VersionGantt::where('hierarchy_ftth_id', $hierarchy['id']) + ->avg('progress'); + return $averageProgress; } public function calculateProgressBasedOnSimple($keyGantt) @@ -1843,15 +997,6 @@ class MasterFunctionsHelper if (!Activity::where("version_gantt_id", $keyGantt['id'])->first()) return $dataFinal; - // $alreadyHasReport = DB::table('report_activity_material as a') - // ->select('a.id') - // ->join('m_activity as b', 'b.id', '=', 'a.activity_id') - // ->where('b.version_gantt_id', '=', $keyGantt['id']) - // ->exists(); - - // if(!$alreadyHasReport) - // return $dataFinal; - $minDate = Activity::where('version_gantt_id', $keyGantt['id'])->whereNull('parent_id')->pluck('start_date')->first(); $begin = new \DateTime($minDate . ' Monday'); @@ -1861,11 +1006,6 @@ class MasterFunctionsHelper /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged $interval = new \DateInterval('P7D'); } else { - // $maxDate = DB::table('assign_material_to_activity as ama') - // ->where("ama.proyek_id", $keyGantt['proyek_id']) - // ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') - // ->where('a.version_gantt_id', '=', $keyGantt['id']) - // ->max("plan_date"); // plan date overlapped with assign_material_to_activity's, it should be m_activity's $maxDate = Activity::where('version_gantt_id', $keyGantt['id'])->whereNull('parent_id')->pluck('end_date')->first(); $end = new \DateTime($maxDate . ' Friday'); $interval = new \DateInterval('P7D'); @@ -1891,7 +1031,6 @@ class MasterFunctionsHelper $dataPlanM = DB::table('m_activity') ->select('id as activity_id', 'bobot_planning', 'start_date', 'biaya_actual', 'duration', 'persentase_progress') - // ->join('m_activity as a', 'a.id', '=', 'activity_id') ->where('proyek_id', '=', $keyGantt['proyek_id']) ->where('type_activity', '=', 'task') ->where('version_gantt_id', '=', $keyGantt['id']) @@ -1947,10 +1086,8 @@ class MasterFunctionsHelper ->groupBy('id') ->first(); $dataTempReport[$w]['id_progress_log'] = $keyActualM->id_progress_log; - // $dataTempReport [$w]['qty'] = $keyActualM->qty; $dataTempReport[$w]['report_date'] = $keyActualM->created_at; $dataTempReport[$w]['bobot_planning'] = $keyActualM->bobot_planning; - // $dataTempReport [$w]['ttl_plan'] = $sumVolActual->ttl_percen_act ? $sumVolActual->ttl_percen_act : 0; $dataTempReport[$w]['biaya_actual'] = $keyActualM->biaya_actual; $dataTempReport[$w]['duration'] = $keyActualM->duration; $dataTempReport[$w]['persentase_progress'] = $keyActualM->persentase_progress; @@ -2028,7 +1165,6 @@ class MasterFunctionsHelper "percentage" => $tempPercentage, "percentagePlan" => $tempPercentagePlan, "percentageReal" => $tempPercentageReal, - "data_details" => $arr_ActualM, "budget_control" => array( "current_budget" => $totalRencanaBudget, "acwp" => round($totalACWP, 0), diff --git a/app/Helpers/MasterFunctionsHelperOld.php b/app/Helpers/MasterFunctionsHelperOld.php new file mode 100644 index 0000000..1f9a112 --- /dev/null +++ b/app/Helpers/MasterFunctionsHelperOld.php @@ -0,0 +1,1693 @@ +first()->config_dayoff; + $diff = date_diff($start, $end); + $endCount = clone $end; + $duration = $diff->days + 1; + $daysRemaining = $duration; + // Loop until the remaining days become zero + while ($daysRemaining > 0) { + $endCount->modify('-1 day'); + // Check if the current day is a day off (Sunday or Saturday) + $currentDayOfWeek = (int) $endCount->format('w'); + if (strpos($dayOffs, (string) $currentDayOfWeek) !== false) { + // continue; // Skip the day off and continue to the next day + $duration--; + } + $daysRemaining--; // Decrease the remaining days by one + } + return $duration; + } + + public function getLatestGantt($id) + { + $maxGanttId = VersionGantt::where("proyek_id", $id)->max("id"); + if (!$maxGanttId) { + $data = array( + "proyek_id" => $id + ); + } else { + $data = array( + "last_gantt_id" => $maxGanttId, + "proyek_id" => $id + ); + } + return $data; + } + + // dipake di dashboard project & bod + public function getSCurve($request) + { + $allGantt = []; + if (!is_int($request)) { + $dataPayload = $request->all(); + if (isset($dataPayload['gantt_id'])) { + $allGantt[] = $dataPayload['gantt_id']; + } else { + $allGantt[] = MasterFunctionsHelper::getLatestGantt($dataPayload['project_id']); + } + } else { + $allGantt[] = MasterFunctionsHelper::getLatestGantt($request); + } + foreach ($allGantt as $gantt) { + if (!isset($gantt['last_gantt_id'])) { + $ganttId = $gantt; + } else { + $ganttId = $gantt['last_gantt_id']; + } + $gantt = VersionGantt::find($ganttId)->toArray(); + // foreach ($gantt as $key => $value) { + // Log::info('gantt '.$value.' index '.$key); + // } + if (isset($gantt['calculation_type'])) { + if ($gantt['calculation_type'] == 'simple') { + // to do + return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt); + } else { + return MasterFunctionsHelper::calculateProgressBasedOnReportMaterial($gantt); + } + } + } + } + public static function getSCurveCarausell($request) + { + $allGantt = []; + if (!is_int($request->gantt_id) && !is_int($request->project_id) && !is_int($request->period)) { + if (isset($request->gantt_id)) { + $allGantt[] = $request->gantt_id; + } else { + $allGantt[] = MasterFunctionsHelper::getLatestGantt($request->project_id); + } + } else { + $allGantt[] = MasterFunctionsHelper::getLatestGantt($request->project_id); + } + foreach ($allGantt as $gantt) { + if (!isset($gantt['last_gantt_id'])) { + $ganttId = $gantt; + } else { + $ganttId = $gantt['last_gantt_id']; + } + $gantt = VersionGantt::find($ganttId)->toArray(); + if (isset($gantt['calculation_type'])) { + if ($gantt['calculation_type'] == 'simple') { + // to do + return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt); + } else { + return MasterFunctionsHelper::calculateProgressBasedOnReportMaterial($gantt); + } + } + } + } + + public function getLinearSCurve($request) + { + $ftths = HierarchyFtth::where('project_id', $request->project_id)->get(); + $ttlProgress = 0; + $ttlPlanning = 0; + + foreach ($ftths as $ftth) { + $progress = VersionGantt::where('hierarchy_ftth_id', $ftth->id)->sum('progress'); + $planning = VersionGantt::where('hierarchy_ftth_id', $ftth->id)->sum('bobot'); + $ttlProgress += $progress; + $ttlPlanning += $planning; + } + + $minDate = Project::select('mulai_proyek')->where('id', $request->project_id)->first(); + $maxDate = Project::select('akhir_proyek')->where('id', $request->project_id)->first(); + + $begin = new \DateTime($minDate->mulai_proyek . ' Monday'); + + $end = new \DateTime($maxDate->akhir_proyek . ' Friday'); + + $interval = new \DateInterval('P7D'); + + $period = new \DatePeriod($begin, $interval, $end); + $dates = iterator_to_array($period); + $count = count($dates); + + $avgProgress = $ttlProgress / $ttlPlanning / $count * 100; + $avgPlanning = $ttlPlanning / $ttlPlanning / $count * 100; + $progressData = []; + $planningData = []; + $dates = []; + $tempProgress = 0; + $tempPlanning = 0; + array_push($progressData, round($tempProgress, 2)); + array_push($planningData, round($tempPlanning, 2)); + foreach ($period as $p) { + $tempProgress += $avgProgress; + $tempPlanning += $avgPlanning; + array_push($progressData, round($tempProgress, 2)); + array_push($planningData, round($tempPlanning, 2)); + array_push($dates, $p->format("Y-m-d")); + } + + $dataResponse = array( + "percentagePlan" => $planningData, + "percentageReal" => $progressData, + "date" => $dates, + ); + + $dataFinal[] = array( + "data" => $dataResponse, + ); + return $dataFinal; + } + + public function calculateProgressBasedOnReportMaterialOld($keyGantt) + { + DB::enableQueryLog(); + $dataFinal = []; + $dataPayload = []; + $dataPayload['period'] = 'week'; + $totalACWP = 0; + $totalBCWP = 0; + $tempPercentage = []; + $dataProject = Project::find($keyGantt['proyek_id']); + $dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->first(); + if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { + $dataPayload['end_date'] = $dataProject->akhir_proyek; + } + if ($dataHeader) { + $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); + } else { + $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); + } + if (!Activity::where("version_gantt_id", $keyGantt['id'])->first()) + return $dataFinal; + $minDate = Activity::where('version_gantt_id', $keyGantt['id'])->whereNull('parent_id')->pluck('start_date')->first(); + $begin = new \DateTime($minDate); + $begin->modify('last Monday'); + if (isset($dataPayload['end_date'])) { + $maxDate = $dataPayload['end_date']; + $end = new \DateTime($maxDate . ' Friday'); + $end->modify('next Friday'); + $end->modify('next Friday'); + /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged + $interval = new \DateInterval('P7D'); + } else { + $actualMaxDate = DB::table('assign_material_to_activity as ama') + ->where("ama.proyek_id", $keyGantt['proyek_id']) + ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') + ->where('a.version_gantt_id', '=', $keyGantt['id']) + ->max("a.end_date"); // plan date overlapped with assign_material_to_activity's, it should be m_activity's + $plannedMaxDate = DB::table('assign_material_to_activity as ama') + ->where("ama.proyek_id", $keyGantt['proyek_id']) + ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') + ->where('a.version_gantt_id', '=', $keyGantt['id']) + ->max("a.planned_end"); // plan date overlapped with assign_material_to_activity's, it should be m_activity' + $maxDate = max(new \DateTime($plannedMaxDate), new \DateTime($actualMaxDate)); + $end = new \DateTime($maxDate->format('Y-m-d') . ' Friday'); + $end->modify('next Friday'); + $end->modify('next Friday'); + $interval = new \DateInterval('P7D'); + } + $period = new \DatePeriod($begin, $interval, $end); + $arr_ActualM = []; + $tempDate = []; + $tempPercentagePlan = []; + $tempPercentagePlanWhr = []; + $tempPercentageReal = []; + $tempTtlPercentPlan = 0; + $tempTtlPercentActual = 0; + $currentACWP = 0; + $currentBCWP = 0; + foreach ($period as $dt) { + $minSevenDays = new \Datetime($dt->format("Y-m-d")); + $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); + $tempDate[] = array($dt->format("Y-m-d")); + $activities = DB::table('m_activity AS a') + ->join('assign_material_to_activity AS amta', 'amta.activity_id', '=', 'a.id') + ->where('a.type_activity', 'task') + ->where('a.bobot_planning', '>', 0) + ->where('a.version_gantt_id', $keyGantt['id']) + ->whereDate('amta.plan_date', '<=', $dt->format("Y-m-d")) + ->whereDate('amta.plan_date', '>', $minSevenDays) + ->select('a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress', 'a.id'); + $dataPlanM = DB::table('m_activity AS a') + ->join('assign_hr_to_activity AS ahta', 'ahta.activity_id', '=', 'a.id') + ->where('a.type_activity', 'task') + ->where('a.bobot_planning', '>', 0) + ->where('a.version_gantt_id', $keyGantt['id']) + ->whereDate('a.start_date', '<=', $dt->format("Y-m-d")) + ->whereDate('a.start_date', '>', $minSevenDays) + ->select('a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress', 'a.id') + ->union($activities) + ->get(); + $dataActualM = DB::table('report_activity_material as ram') + ->select('ram.activity_id', 'ram.qty', 'ram.report_date', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress') + ->join('m_activity as a', 'a.id', '=', 'ram.activity_id') + ->where('a.version_gantt_id', '=', $keyGantt['id']) + ->where('a.proyek_id', '=', $keyGantt['proyek_id']) + ->whereDate('ram.report_date', '<=', $dt->format("Y-m-d")) + ->whereDate('ram.report_date', '>', $minSevenDays) + ->get(); + $dataTempPlan = []; + $x = 0; + $sumPercentagePlan = 0; + $totalACWP = isset($totalACWP) ? $totalACWP : 0; + $totalBCWP = isset($totalBCWP) ? $totalBCWP : 0; + foreach ($dataPlanM as $keyPlanM) { + // $sumVolPlan = DB::table(function ($query) use ($keyGantt) { + // $query->select('a.*') + // ->from('m_activity AS a') + // ->join('assign_material_to_activity as amta', 'amta.activity_id', '=', 'a.id') + // ->where('a.type_activity', 'task') + // ->where('a.bobot_planning', '>', 0) + // ->where('a.version_gantt_id', $keyGantt['id']) + // ->unionAll(function ($query) use ($keyGantt) { + // $query->select('a.*') + // ->from('m_activity AS a') + // ->join('assign_hr_to_activity as ahta', 'ahta.activity_id', '=', 'a.id') + // ->where('a.type_activity', 'task') + // ->where('a.bobot_planning', '>', 0) + // ->where('a.version_gantt_id', $keyGantt['id']); + // }) + // ->orderBy('id', 'asc'); + // }, 'subquery') + // ->sum('bobot_planning'); + $sumVolPlan = DB::table('assign_material_to_activity') + ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) + ->where('activity_id', '=', $keyPlanM->id) + ->groupBy('activity_id') + ->first(); + if ($keyPlanM->duration) { + $weekCount = $keyPlanM->duration / 7; + $weeklyPlan = $weekCount >= 1 ? $sumVolPlan->ttl_qty_plan / $weekCount : $sumVolPlan->ttl_qty_plan / $weekCount / 7; + // $weeklyProgress = $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; + $weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; + // $bobotHari = $keyPlanM->bobot_planning / $keyPlanM->duration; + } else { + // $weeklyProgress = 0; + $weekCount = 1 / 7; + $weeklyPlan = $weekCount >= 1 ? $sumVolPlan->ttl_qty_plan / $weekCount : $sumVolPlan->ttl_qty_plan / $weekCount / 7; + // $weeklyProgress = $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; + $weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; + } + + // $weeklyPlan = $weekCount > 0 ? $keyPlanM->bobot_planning / $weekCount : 0; + // $weeklyProgress = $weeklyPlan * $keyPlanM->bobot_planning; + $dataTempPlan[$x]['activity_id'] = $keyPlanM->id; + $dataTempPlan[$x]['bobot_planning'] = $keyPlanM->bobot_planning; + $dataTempPlan[$x]['ttl_plan'] = $sumVolPlan; + $dataTempPlan[$x]['biaya_actual'] = $keyPlanM->biaya_actual; + $dataTempPlan[$x]['duration'] = $keyPlanM->duration; + $dataTempPlan[$x]['persentase_progress'] = $keyPlanM->persentase_progress; + try { + $dataTempPlan[$x]['percentage'] = $keyPlanM->bobot_planning; + $sumPercentagePlan += $weeklyProgress; + if (isset($keyPlanM->duration) && $keyPlanM->duration > 0) + $totalBCWP += (((($keyPlanM->persentase_progress * $keyPlanM->bobot_planning) / 100) / $keyPlanM->duration) * $totalRencanaBudget) / 100; + else + $totalBCWP = 0; + $dataTempPlan[$x]['totalBCWP'] = $totalBCWP; + } catch (\DivisionByZeroError $e) { + return response()->json(['message' => $e->getMessage()]); + } + $x++; + } + $w = 0; + $dataTempReport = []; + $sumPercentageActual = 0; + foreach ($dataActualM as $keyActualM) { + $sumVolActual = DB::table('assign_material_to_activity') + ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) + ->where('activity_id', '=', $keyActualM->activity_id) + ->groupBy('activity_id') + ->first(); + $sumReportActual = DB::table('report_activity_material') + ->where('activity_id', $keyActualM->activity_id) + ->sum('qty'); + $reportCount = DB::table('report_activity_material')->where('activity_id', '=', $keyActualM->activity_id)->count(); + $dataTempReport[$w]['activity_id'] = $keyActualM->activity_id; + $dataTempReport[$w]['qty'] = $keyActualM->qty; + $dataTempReport[$w]['report_date'] = $keyActualM->report_date; + $dataTempReport[$w]['bobot_planning'] = $keyActualM->bobot_planning; + $dataTempReport[$w]['ttl_plan'] = $sumVolActual->ttl_qty_plan; + $dataTempReport[$w]['biaya_actual'] = $keyActualM->biaya_actual; + $dataTempReport[$w]['duration'] = $keyActualM->duration; + $dataTempReport[$w]['persentase_progress'] = $keyActualM->persentase_progress; + try { + // assign_material_to_activity + $checkStatusActivity = DB::table('assign_material_to_activity') + ->select('activity_id', 'status_activity') + ->where('activity_id', '=', $keyActualM->activity_id) + ->orderBy('status_activity', 'ASC') + ->first(); + $dataTempReport[$w]['percentage'] = ($keyActualM->qty / $sumVolActual->ttl_qty_plan) * $keyActualM->bobot_planning; + // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; + // if($keyActualM->qty/$sumVolActual->ttl_qty_plan >= 1){ + if ($checkStatusActivity->status_activity == 'done') { + $sumPercentageActual += $keyActualM->bobot_planning / $reportCount; + // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; + } else { + if ($keyActualM->qty / $sumVolActual->ttl_qty_plan >= 1 || (int) $sumVolActual->ttl_qty_plan == (int) $sumReportActual) { + $sumPercentageActual += (($keyActualM->qty / $sumVolActual->ttl_qty_plan) * $keyActualM->bobot_planning) * (95 / 100); + // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; + } else { + $sumPercentageActual += ($keyActualM->qty / $sumVolActual->ttl_qty_plan) * $keyActualM->bobot_planning; + // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; + } + } + // }else { + // if($checkStatusActivity->status_activity == 'done'){ + // $sumPercentageActual+=($keyActualM->qty/$keyActualM->qty)*$keyActualM->bobot_planning; + // }else{ + // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; + // } + // } + $totalACWP += $keyActualM->duration > 0 ? $keyActualM->biaya_actual / $keyActualM->duration : 0; + } catch (\DivisionByZeroError $e) { + return response()->json(['message' => $e->getMessage()]); + } + $dataTempReport[$w]['totalacwp'] = $totalACWP; + $w++; + } + $arr_ActualM[] = array( + 'date' => $dt->format("Y-m-d"), + 'percentPlan' => $sumPercentagePlan, + 'percentActual' => $sumPercentageActual, + 'plan' => $dataTempPlan, + 'actual' => $dataTempReport, + ); + $today = new DateTime(); + $date = new DateTime($dt->format("Y-m-d")); + if (isset($dataPayload['period']) && $dataPayload['period'] == 'week') { + $tempTtlPercentPlan += $sumPercentagePlan; + $tempTtlPercentActual += $sumPercentageActual; + $currentACWP += $totalACWP; + $currentBCWP += $totalBCWP; + $tempPercentage[] = array(round($tempTtlPercentPlan, 2), round($tempTtlPercentActual, 2)); + $tempPercentagePlan[] = round($tempTtlPercentPlan, 2); + $tempPercentagePlanWhr[] = ["weekly period", $tempPercentagePlan]; + if ($date < $today) { + $tempPercentageReal[] = round($tempTtlPercentActual, 2); + } + if ($tempTtlPercentPlan >= 100 && $tempTtlPercentActual >= 100) { + break; + } + } else { + $tempPercentage[] = array(round($sumPercentagePlan, 2), round($sumPercentageActual, 2)); + $tempPercentagePlan[] = round($sumPercentagePlan, 2); + if ($date < $today) { + $tempPercentageReal[] = round($sumPercentageActual, 2); + } + } + } + try { + if (round($totalACWP, 0) > $totalRencanaBudget) { + $estimatedCost = round($totalACWP, 0) + 0; + } else { + $estimatedCost = ($totalRencanaBudget + 0); + } + } catch (\DivisionByZeroError $e) { + return response()->json([ + 'message' => $e->getMessage(), + "line" => 566, + 'gantt' => $keyGantt, + ]); + } + $estimatedCost = $totalACWP > $totalRencanaBudget ? $totalACWP : $totalRencanaBudget; + $costDeviation = $totalRencanaBudget - $estimatedCost; + if ($costDeviation > 0) { + $potential = "SAVING"; + } else { + $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; + } + $lastReal = $tempPercentageReal[count($tempPercentageReal) - 1]; + $totalBCWP = $lastReal * $dataProject->rencana_biaya / 100; + $dataResponse = array( + "date" => $tempDate, + "percentage" => $tempPercentage, + "percentagePlan" => $tempPercentagePlan, + "percentageReal" => $tempPercentageReal, + "data_details" => $arr_ActualM, + "budget_control" => array( + "current_budget" => $totalRencanaBudget, + "acwp" => round($totalACWP, 0), + "bcwp" => round($totalBCWP, 0), + "rem_to_complete" => ($totalRencanaBudget - round($totalACWP, 0)), + "add_cost_to_complete" => 0, + "estimated_at_completion" => $estimatedCost, + "cost_deviation" => $costDeviation, + "potential" => $potential, + ) + ); + $dataFinal[] = array( + "proyek_name" => $dataProject->nama, + "data" => $dataResponse, + "gantt" => $keyGantt + ); + return $dataFinal; + } + + public function calculateProgressBasedOnReportMaterial($keyGantt) + { + DB::enableQueryLog(); + + $dataFinal = []; + $dataPayload = []; + $dataPayload['period'] = 'week'; + // $totalACWP = 0; + // $totalBCWP = 0; + // $tempPercentage = []; + + $dataProject = Project::find($keyGantt['proyek_id']); + if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { + $dataPayload['end_date'] = $dataProject->akhir_proyek; + } + + if (!Activity::where("version_gantt_id", $keyGantt['id'])->first()) + return $dataFinal; + + $activityQueryBuilder = Activity::where('version_gantt_id', $keyGantt['id'])->whereNull('parent_id'); + $activityData = $activityQueryBuilder->first(); + $minDate = $activityQueryBuilder->pluck('start_date')->first(); + + $begin = new \DateTime($minDate); + $begin = $begin->modify('-1 day'); + if (isset($dataPayload['end_date'])) { + $maxDate = $dataPayload['end_date']; + $end = new \DateTime($maxDate . ' Friday'); + // $end->modify('next Friday'); + // $end->modify('next Friday'); + /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged + $interval = new \DateInterval('P1D'); + } else { + $actualMaxDate = DB::table('assign_material_to_activity as ama') + ->where("ama.proyek_id", $keyGantt['proyek_id']) + ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') + ->where('a.version_gantt_id', '=', $keyGantt['id']) + ->max("a.end_date"); // plan date overlapped with assign_material_to_activity's, it should be m_activity's + $plannedMaxDate = DB::table('assign_material_to_activity as ama') + ->where("ama.proyek_id", $keyGantt['proyek_id']) + ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') + ->where('a.version_gantt_id', '=', $keyGantt['id']) + ->max("a.planned_end"); // plan date overlapped with assign_material_to_activity's, it should be m_activity' + $maxDate = max(new \DateTime($plannedMaxDate), new \DateTime($actualMaxDate)); + $end = new \DateTime($maxDate->format('Y-m-d') . ' Friday'); + // $end->modify('next Friday'); + // $end->modify('next Friday'); + $interval = new \DateInterval('P1D'); + } + $period = new \DatePeriod($begin, $interval, $end); + + // $arr_ActualM = []; + $tempDate = []; + // $tempPercentagePlan = []; + // $tempPercentagePlanWhr = []; + // $tempPercentageReal = []; + // $tempTtlPercentPlan = 0; + // $tempTtlPercentActual = 0; + + // $currentACWP = 0; + // $currentBCWP = 0; + $dataActivityPlanDate = []; + $progressPlanKomulatifWeek = []; + $progressActualKomulatifWeek = []; + $progressPlanBar = 0; + $dateWeek = []; + $tmpProgressPlanWeek = 0; + $tmpProgressActualWeek = 0; + foreach ($period as $dt) { + $loopDay = $dt->format("Y-m-d"); + //new \Datetime($dt->format("Y-m-d")); + // $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); + $tempDate[] = array($dt->format("Y-m-d")); + + $dataPlanM = DB::table('m_activity') + ->where('type_activity', 'task') + ->where('bobot_planning', '>', 0) + ->where('version_gantt_id', $keyGantt['id']) + ->whereDate('planned_start', '<=', $loopDay) + ->whereDate('planned_end', '>=', $loopDay) + ->select('name', 'bobot_planning', 'biaya_actual', 'duration', 'persentase_progress', 'id', 'planned_start', 'planned_end') + ->get(); + + $dataActualM = DB::table('report_activity_material as ram') + ->join('m_activity as ma', 'ma.id', '=', 'ram.activity_id') + ->select( + 'ram.activity_id', + 'ram.qty as qty_actual', + 'ma.bobot_planning', + 'ma.name', + DB::raw('(SELECT SUM(amta.qty_planning) FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS qty_plan'), + DB::raw('(SELECT SUM(ram.qty) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS sum_qty_actual'), + DB::raw('(SELECT DISTINCT status_activity FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS status_activity'), + DB::raw('(SELECT COUNT(id) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS count_report') + ) + ->where('ram.report_date', $loopDay) + ->where('ma.version_gantt_id', $keyGantt['id']) + ->get(); + + $dataActivityPlan = []; + $dataActivityActual = []; + $today = date('Y-m-d'); + // if (new \DateTime($loopDay) < $today) { + // $statusCutOfDate = true; + // } + + + + // $progressPlanKomulatifWeek[] = array('date' => $loopDay, 'progress' =>round($tmpProgressPlanWeek, 2)); + // // loop cut off day + // if ($loopDay <= $today) { + // // $tempPercentageReal[] = round($tempTtlPercentActual, 2); + // $progressActualKomulatifWeek[] = round($tmpProgressActualWeek, 2); + // $progressPlanBar[] = array('date' => $loopDay, 'progress' =>round($tmpProgressPlanWeek, 2));//$progressPlanKomulatifWeek; + // // $progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek, 2); + // } + $dateWeek[] = [$loopDay]; + // $progressPlanKomulatifWeek[] += $tmpProgressPlanWeek; + // loop per activity by day + foreach ($dataPlanM as $keyPlanM) { + # hitung untuk persentase progress planning + // if($keyPlanM->duration == 0){ + // $duration = 2; + // Tanggal awal + $startDate = new DateTime($keyPlanM->planned_start); + // Tanggal akhir + $endDate = new DateTime($keyPlanM->planned_end); + // Menghitung selisih hari + $interval = $startDate->diff($endDate); + // Mengambil hasil selisih hari + $duration = (int) $interval->days + 1; + // }else{ + // $duration = $keyPlanM->duration + 2; + // } + // $startPlan = new DateTime($keyPlanM->planned_start); + // $endPlan = new DateTime($keyPlanM->planned_end); + // $interval = $startPlan->diff($endPlan); + + // // Mengambil hasil selisih hari + // $duration = $interval->days; + $progressPlanWeek = $keyPlanM->bobot_planning / $duration; + $dataActivityPlan[] = array( + 'progressPlanDay' => $progressPlanWeek, + 'name' => $keyPlanM->name, + 'bobot_p' => $keyPlanM->bobot_planning, + 'duration' => $keyPlanM->duration + ); + $tmpProgressPlanWeek += $progressPlanWeek; + } + + // hitung progress actual + foreach ($dataActualM as $keyActualM) { + # hitung untuk persentase progress actual + // $progressActualWeek = ((((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*100)*$keyActualM->bobot_planning)/100; + // jika total report > dari planning + if ($keyActualM->sum_qty_actual > $keyActualM->qty_plan) { + $progressActualWeek = ($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * $keyActualM->bobot_planning; + } else { + // jika total report < dari planning + // $progressActualWeek = ((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*$keyActualM->bobot_planning; + if ($keyActualM->qty_actual == 0) { + $progressActualWeek = 0; + } else { + $progressActualWeek = ($keyActualM->qty_actual / $keyActualM->qty_plan) * $keyActualM->bobot_planning; + } + } + if ($keyActualM->status_activity == 'done') { + $progressActualWeek = $keyActualM->bobot_planning / $keyActualM->count_report; + } else { + $progressActualWeek = $progressActualWeek > ($keyActualM->bobot_planning * 95) / 100 ? ($keyActualM->bobot_planning * 95) / 100 : $progressActualWeek; + } + $dataActivityActual[] = array( + 'progressActualDay' => $progressActualWeek, + 'qty_act' => $keyActualM->qty_actual, + 'bobot_p' => $keyActualM->bobot_planning, + 'qty_plan' => $keyActualM->qty_plan, + 'status_activity' => $keyActualM->status_activity, + 'sum_qty_actual' => $keyActualM->sum_qty_actual, + 'name' => $keyActualM->name + ); + + $tmpProgressActualWeek += $progressActualWeek; + } + + $progressPlanKomulatifWeek[] = round($tmpProgressPlanWeek, 2); + // loop cut off day + if ($loopDay <= $today) { + if(round($tmpProgressActualWeek, 2) > $activityData['persentase_progress']) { + $progressActualKomulatifWeek[] = $activityData['persentase_progress']; + } else { + $progressActualKomulatifWeek[] = round($tmpProgressActualWeek, 2); + } + // For Planning + $progressPlanBar = round($tmpProgressPlanWeek, 2); + } + + $dataActivityPlanDate[] = array( + "date" => $loopDay, + "statusWeek" => new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday') ? true : false, + "activity-plan" => $dataActivityPlan, + "activity-actual" => $dataActivityActual, + "tmpProgressActualWeek" => $tmpProgressActualWeek, + "progressPlanWeek" => $tmpProgressPlanWeek + ); + } + + $dataFinal[] = array( + // "date" => $dateWeek, + "proyek_name" => $dataProject->nama, + "data" => [ + "date" => $dateWeek, + "percentagePlan" => $progressPlanKomulatifWeek, + "percentageReal" => $progressActualKomulatifWeek, + "data_details" => $dataActivityPlanDate, + "progressPlanToDay" => $progressPlanBar + ], + // "gantt" => $keyGantt + ); + return $dataFinal; + } + + public function calculateSCurveOld($projectId) + { + DB::enableQueryLog(); + + $dataFinal = []; + $dataPayload = []; + $dataPayload['period'] = 'week'; + // $totalACWP = 0; + // $totalBCWP = 0; + $tempPercentage = []; + + $dataProject = Project::find($projectId); + $dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $projectId)->first(); + if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { + $dataPayload['end_date'] = $dataProject->akhir_proyek; + } + + if ($dataHeader) { + $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $projectId)->sum("rencana_biaya"); + } else { + $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $projectId)->sum("rencana_biaya"); + } + + // $alreadyHasReport = DB::table('report_activity_material as a') + // ->select('a.id') + // ->join('m_activity as b', 'b.id', '=', 'a.activity_id') + // ->exists(); + + $minDate = $dataProject->mulai_proyek; + + $begin = new \DateTime($minDate); + $begin->modify('last Monday'); + if (isset($dataPayload['end_date'])) { + $maxDate = $dataPayload['end_date']; + $end = new \DateTime($maxDate . ' Friday'); + $end->modify('next Friday'); + // $end->modify('next Friday'); + /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged + $interval = new \DateInterval('P7D'); + } else { + // $maxDate = DB::table('assign_material_to_activity as ama') + // ->where("ama.proyek_id", $projectId) + // ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') + // ->max("plan_date"); // plan date overlapped with assign_material_to_activity's, it should be m_activity's + $maxDate = $dataProject->akhir_proyek; + $end = new \DateTime($maxDate); + $end->modify('next Friday'); + $end->modify('next Friday'); + $interval = new \DateInterval('P7D'); + } + $period = new \DatePeriod($begin, $interval, $end); + + $arr_ActualM = []; + $tempDate = []; + $tempPercentagePlan = []; + $tempPercentagePlanWhr = []; + $tempPercentageReal = []; + $tempTtlPercentPlan = 0; + $tempTtlPercentActual = 0; + + // $currentACWP = 0; + // $currentBCWP = 0; + + foreach ($period as $dt) { + $minSevenDays = new \Datetime($dt->format("Y-m-d")); + $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); + // $dataPlanM = DB::table('assign_material_to_activity as ama') + // ->select('ama.activity_id', 'ama.qty_planning', 'ama.plan_date', 'ama.start_activity', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress') + // ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') + // ->where('ama.proyek_id', '=', $keyGantt['proyek_id']) + // ->where('a.version_gantt_id', '=', $keyGantt['id']) + // ->whereDate('ama.plan_date', '<=',$dt->format("Y-m-d")) + // ->whereDate('ama.plan_date', '>', $minSevenDays) + // ->get(); + + $activities = DB::table('m_activity AS a') + ->join('assign_material_to_activity AS amta', 'amta.activity_id', '=', 'a.id') + ->where('a.type_activity', 'task') + ->where('a.bobot_planning', '>', 0) + ->where('a.proyek_id', '=', $projectId) + ->whereDate('amta.plan_date', '<=', $dt->format("Y-m-d")) + ->whereDate('amta.plan_date', '>', $minSevenDays) + ->select('a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress', 'a.id'); + + $dataPlanM = DB::table('m_activity AS a') + ->join('assign_hr_to_activity AS ahta', 'ahta.activity_id', '=', 'a.id') + ->where('a.type_activity', 'task') + ->where('a.bobot_planning', '>', 0) + ->where('a.proyek_id', '=', $projectId) + ->whereDate('a.start_date', '<=', $dt->format("Y-m-d")) + ->whereDate('a.start_date', '>', $minSevenDays) + ->select('a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress', 'a.id') + ->union($activities) + ->get(); + + $dataActualM = DB::table('report_activity_material as ram') + ->select('ram.activity_id', 'ram.qty', 'ram.report_date', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress') + ->join('m_activity as a', 'a.id', '=', 'ram.activity_id') + ->where('a.proyek_id', '=', $projectId) + ->whereDate('ram.report_date', '<=', $dt->format("Y-m-d")) + ->whereDate('ram.report_date', '>', $minSevenDays) + ->get(); + $dataTempPlan = []; + $x = 0; + $sumPercentagePlan = 0; + // $totalACWP = isset($totalACWP) ? $totalACWP : 0; + // $totalBCWP = isset($totalBCWP) ? $totalBCWP : 0; + + foreach ($dataPlanM as $keyPlanM) { + // $sumVolPlan = DB::table(function ($query) use ($projectId) { + // $query->select('a.*') + // ->from('m_activity AS a') + // ->join('assign_material_to_activity as amta', 'amta.activity_id', '=', 'a.id') + // ->where('a.type_activity', 'task') + // ->where('a.bobot_planning', '>', 0) + // ->where('a.proyek_id', $projectId) + // ->unionAll(function ($query) use ($projectId) { + // $query->select('a.*') + // ->from('m_activity AS a') + // ->join('assign_hr_to_activity as ahta', 'ahta.activity_id', '=', 'a.id') + // ->where('a.type_activity', 'task') + // ->where('a.bobot_planning', '>', 0) + // ->where('a.proyek_id', $projectId); + // })->orderBy('id', 'asc'); + // }, 'subquery') + // ->sum('bobot_planning'); + $sumVolPlan = DB::table('assign_material_to_activity') + ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) + ->where('activity_id', '=', $keyPlanM->id) + ->groupBy('activity_id') + ->first(); + + if ($keyPlanM->duration) { + $weekCount = $keyPlanM->duration / 7; + $weeklyPlan = $weekCount >= 1 ? $sumVolPlan->ttl_qty_plan / $weekCount : $sumVolPlan->ttl_qty_plan / $weekCount / 7; + // $weeklyProgress = $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; + $weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; + // $bobotHari = $keyPlanM->bobot_planning / $keyPlanM->duration; + } else { + // $weeklyProgress = 0; + $weekCount = 1 / 7; + $weeklyPlan = $weekCount >= 1 ? $sumVolPlan->ttl_qty_plan / $weekCount : $sumVolPlan->ttl_qty_plan / $weekCount / 7; + // $weeklyProgress = $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; + $weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning; + } + + // $weeklyPlan = $sumVolPlan->ttl_qty_plan / $weekCount; + // $weeklyProgress = 80; + $dataTempPlan[$x]['activity_id'] = $keyPlanM->id; + $dataTempPlan[$x]['bobot_planning'] = $keyPlanM->bobot_planning; + $dataTempPlan[$x]['ttl_plan'] = $sumVolPlan; + $dataTempPlan[$x]['biaya_actual'] = $keyPlanM->biaya_actual; + $dataTempPlan[$x]['duration'] = $keyPlanM->duration; + $dataTempPlan[$x]['persentase_progress'] = $keyPlanM->persentase_progress; + try { + $dataTempPlan[$x]['percentage'] = $keyPlanM->bobot_planning; + $sumPercentagePlan += $weeklyProgress; + // if (isset($keyPlanM->duration) && $keyPlanM->duration > 0) + // $totalBCWP += (((($keyPlanM->persentase_progress * $keyPlanM->bobot_planning) / 100) / $keyPlanM->duration) * $totalRencanaBudget) / 100; + // else + // $totalBCWP = 0; + // $dataTempPlan[$x]['totalBCWP'] = $totalBCWP; + } catch (\DivisionByZeroError $e) { + return response()->json(['message' => $e->getMessage()]); + } + $x++; + } + + $w = 0; + $dataTempReport = []; + $sumPercentageActual = 0; + foreach ($dataActualM as $keyActualM) { + $sumVolActual = DB::table('assign_material_to_activity') + ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) + ->where('activity_id', '=', $keyActualM->activity_id) + ->groupBy('activity_id') + ->first(); + if (!isset($sumVolActual)) { + $sumVolActual = (object) [ + 'activity_id' => $keyActualM->activity_id, + 'ttl_qty_plan' => "0" + ]; + } + $sumReportActual = DB::table('report_activity_material') + ->where('activity_id', $keyActualM->activity_id) + ->sum('qty'); + $reportCount = DB::table('report_activity_material')->where('activity_id', '=', $keyActualM->activity_id)->count(); + $dataTempReport[$w]['activity_id'] = $keyActualM->activity_id; + $dataTempReport[$w]['qty'] = $keyActualM->qty; + $dataTempReport[$w]['report_date'] = $keyActualM->report_date; + $dataTempReport[$w]['bobot_planning'] = $keyActualM->bobot_planning; + $dataTempReport[$w]['ttl_plan'] = $sumVolActual->ttl_qty_plan; + $dataTempReport[$w]['biaya_actual'] = $keyActualM->biaya_actual; + $dataTempReport[$w]['duration'] = $keyActualM->duration; + $dataTempReport[$w]['persentase_progress'] = $keyActualM->persentase_progress; + try { + // assign_material_to_activity + $checkStatusActivity = DB::table('assign_material_to_activity') + ->select('activity_id', 'status_activity') + ->where('activity_id', '=', $keyActualM->activity_id) + ->orderBy('status_activity', 'ASC') + ->first(); + if (!isset($checkStatusActivity)) { + $checkStatusActivity = (object) [ + 'activity_id' => $keyActualM->activity_id, + 'status_activity' => 'open' + ]; + } + if ($sumVolActual->ttl_qty_plan == "0") { + $actual = 0; + } else { + $actual = $keyActualM->qty / $sumVolActual->ttl_qty_plan; + } + $dataTempReport[$w]['percentage'] = $actual * $keyActualM->bobot_planning; + // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; + // if($keyActualM->qty/$sumVolActual->ttl_qty_plan >= 1){ + if ($checkStatusActivity->status_activity == 'done') { + $sumPercentageActual += $keyActualM->bobot_planning / $reportCount; + // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; + } else { + if ($actual >= 1 || (int) $sumVolActual->ttl_qty_plan == (int) $sumReportActual) { + $sumPercentageActual += ($actual * $keyActualM->bobot_planning) * (95 / 100); + // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; + } else { + $sumPercentageActual += $actual * $keyActualM->bobot_planning; + // $sumPercentageActual = $sumPercentageActual > $keyGantt['progress'] ? $keyGantt['progress'] : $sumPercentageActual; + } + } + // }else { + // if($checkStatusActivity->status_activity == 'done'){ + // $sumPercentageActual+=($keyActualM->qty/$keyActualM->qty)*$keyActualM->bobot_planning; + // }else{ + // $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; + // } + // } + + + // $totalACWP += $keyActualM->duration > 0 ? $keyActualM->biaya_actual / $keyActualM->duration : 0; + } catch (\DivisionByZeroError $e) { + return response()->json(['message' => $e->getMessage()]); + } + // $dataTempReport[$w]['totalacwp'] = $totalACWP; + $w++; + } + + $arr_ActualM[] = array( + 'date' => $dt->format("Y-m-d"), + 'percentPlan' => $sumPercentagePlan, + 'percentActual' => $sumPercentageActual, + 'plan' => $dataTempPlan, + 'actual' => $dataTempReport, + ); + + $today = new DateTime(); + $date = new DateTime($dt->format("Y-m-d")); + if (isset($dataPayload['period']) && $dataPayload['period'] == 'week') { + $tempTtlPercentPlan += $sumPercentagePlan; + $tempTtlPercentActual += $sumPercentageActual; + // todo + // if ($tempTtlPercentPlan >= 100) + // $tempTtlPercentPlan = 100; + + // $currentACWP += $totalACWP; + // $currentBCWP += $totalBCWP; + + $tempPercentage[] = array(round($tempTtlPercentPlan, 2), round($tempTtlPercentActual, 2)); + $tempPercentagePlan[] = round($tempTtlPercentPlan, 2); + $tempPercentagePlanWhr[] = ["weekly period", $tempPercentagePlan]; + if ($date < $today) { + $tempPercentageReal[] = round($tempTtlPercentActual, 2); + } + // if ($tempTtlPercentPlan >= 100 && $tempTtlPercentActual >= 100) { + // break; + // } + } else { + $tempPercentage[] = array(round($sumPercentagePlan, 2), round($sumPercentageActual, 2)); + $tempPercentagePlan[] = round($sumPercentagePlan, 2); + if ($date < $today) { + $tempPercentageReal[] = round($sumPercentageActual, 2); + } + } + $tempDate[] = array($dt->format("Y-m-d")); + } + + // try { + // if (round($totalACWP, 0) > $totalRencanaBudget) { + // $estimatedCost = round($totalACWP, 0) + 0; + // } else { + // $estimatedCost = ($totalRencanaBudget + 0); + // } + // } catch (\DivisionByZeroError $e) { + // return response()->json([ + // 'message' => $e->getMessage(), + // "line" => 566, + // ]); + // } + // $estimatedCost = $totalACWP > $totalRencanaBudget ? $totalACWP : $totalRencanaBudget; + + // $costDeviation = $totalRencanaBudget - $estimatedCost; + // if ($costDeviation > 0) { + // $potential = "SAVING"; + // } else { + // $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; + // } + + // $lastReal = $tempPercentageReal[count($tempPercentageReal) - 1]; + // $lastReal = $tempPercentageReal[count($tempPercentageReal) < 1 ? count($tempPercentageReal) : count($tempPercentageReal) - 1]; + // $totalBCWP = $lastReal * $dataProject->rencana_biaya / 100; + $dataResponse = array( + "date" => $tempDate, + "start" => $minDate, + "begin" => $begin, + // "periode" => $period, + "end" => $end, + "percentage" => $tempPercentage, + "percentagePlan" => $tempPercentagePlan, + "percentageReal" => $tempPercentageReal, + // "data_details" => $arr_ActualM, + // "budget_control" => array( + // "current_budget" => $totalRencanaBudget, + // "acwp" => round($totalACWP, 0), + // "bcwp" => round($totalBCWP, 0), + // "rem_to_complete" => ($totalRencanaBudget - round($totalACWP, 0)), + // "add_cost_to_complete" => 0, + // "estimated_at_completion" => $estimatedCost, + // "cost_deviation" => $costDeviation, + // "potential" => $potential, + // ) + ); + + $dataFinal[] = array( + "proyek_name" => $dataProject->nama, + "data" => $dataResponse, + ); + + return $dataFinal; + } + + public function calculateSCurve($projectId) + { + DB::enableQueryLog(); + + $dataFinal = []; + $dataPayload = []; + $dataPayload['period'] = 'week'; + + $dataProject = Project::find($projectId); + if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { + $dataPayload['end_date'] = $dataProject->akhir_proyek; + } + + $minDate = $dataProject->mulai_proyek; + + $begin = new \DateTime($minDate); + $begin = $begin->modify('-1 day'); + if (isset($dataPayload['end_date'])) { + $maxDate = $dataPayload['end_date']; + $end = new \DateTime($maxDate . ' Friday'); + $interval = new \DateInterval('P1D'); + } else { + $maxDate = $dataProject->akhir_proyek; + $end = new \DateTime($maxDate); + $end = new \DateTime($end->format('Y-m-d') . ' Friday'); + $interval = new \DateInterval('P1D'); + } + $period = new \DatePeriod($begin, $interval, $end); + $tempDate = []; + $dataActivityPlanDate = []; + $progressPlanKomulatifWeek = []; + $progressActualKomulatifWeek = []; + $dateWeek = []; + $tmpProgressPlanWeek = 0; + $tmpProgressActualWeek = 0; + foreach ($period as $dt) { + $loopDay = $dt->format("Y-m-d"); + $tempDate[] = array($dt->format("Y-m-d")); + $dataPlanM = []; + $dataActualM = []; + + $dataPlanM = DB::table('m_activity') + ->where('type_activity', 'task') + ->where('bobot_planning', '>', 0) + ->where('proyek_id', $projectId) + ->whereDate('planned_start', '<=', $loopDay) + ->whereDate('planned_end', '>=', $loopDay) + ->select('name', 'bobot_planning', 'biaya_actual', 'duration', 'persentase_progress', 'id', 'planned_start', 'planned_end') + ->get(); + + $dataActualM = DB::table('report_activity_material as ram') + ->join('m_activity as ma', 'ma.id', '=', 'ram.activity_id') + ->select( + 'ram.activity_id', + 'ram.qty as qty_actual', + 'ma.bobot_planning', + 'ma.name', + DB::raw('(SELECT SUM(amta.qty_planning) FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS qty_plan'), + DB::raw('(SELECT SUM(ram.qty) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS sum_qty_actual'), + DB::raw('(SELECT DISTINCT status_activity FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS status_activity'), + DB::raw('(SELECT COUNT(id) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS count_report') + ) + ->where('ram.report_date', $loopDay) + ->where('ma.proyek_id', $projectId) + ->get(); + + $dataActivityPlan = []; + $dataActivityActual = []; + $today = date('Y-m-d'); + + // Hitung Plan + $dateWeek[] = [$loopDay]; + foreach ($dataPlanM as $keyPlanM) { + # hitung untuk persentase progress planning + // if($keyPlanM->duration == 0){ + // $duration = 2; + // Tanggal awal + $startDate = new DateTime($keyPlanM->planned_start); + // Tanggal akhir + $endDate = new DateTime($keyPlanM->planned_end); + // Menghitung selisih hari + $interval = $startDate->diff($endDate); + // Mengambil hasil selisih hari + $duration = (int) $interval->days + 1; + // }else{ + // $duration = $keyPlanM->duration + 2; + // } + // $startPlan = new DateTime($keyPlanM->planned_start); + // $endPlan = new DateTime($keyPlanM->planned_end); + // $interval = $startPlan->diff($endPlan); + + // // Mengambil hasil selisih hari + // $duration = $interval->days; + // 2023-07-26 + $progressPlanWeek = $keyPlanM->bobot_planning / $duration; + $dataActivityPlan[] = array( + 'progressPlanDay' => $progressPlanWeek, + 'name' => $keyPlanM->name, + 'bobot_p' => $keyPlanM->bobot_planning, + 'duration' => $keyPlanM->duration + ); + $tmpProgressPlanWeek += $progressPlanWeek; + } + + // hitung progress actual + foreach ($dataActualM as $keyActualM) { + # hitung untuk persentase progress actual + // $progressActualWeek = ((((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*100)*$keyActualM->bobot_planning)/100; + // jika total report > dari planning + if ($keyActualM->sum_qty_actual > $keyActualM->qty_plan) { + $progressActualWeek = (($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) * $keyActualM->bobot_planning / 100; + } else { + // jika total report < dari planning + // $progressActualWeek = ((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*$keyActualM->bobot_planning; + if ($keyActualM->qty_actual == 0) { + $progressActualWeek = 0; + } else { + $progressActualWeek = ($keyActualM->qty_actual / $keyActualM->qty_plan) * $keyActualM->bobot_planning; + } + } + if ($keyActualM->status_activity == 'done') { + // if($keyActualM->sum_qty_actual > $keyActualM->qty_plan){ + + // } + // if($progressActualWeek > $keyActualM->bobot_planning){ + // $progressActualWeek = $keyActualM->bobot_planning; + // }else if($keyActualM->qty_actual == 0){ + // $progressActualWeek = $keyActualM->bobot_planning; + // }else if($keyActualM->qty_plan == $keyActualM->sum_qty_actual){ + $progressActualWeek = $keyActualM->bobot_planning / $keyActualM->count_report; + // }else { + // $progressActualWeek = $progressActualWeek; + // } + // $progressActualWeek = $progressActualWeek > $keyActualM->bobot_planning ? $keyActualM->bobot_planning : $progressActualWeek; + // jika report lebih dari 1 x, maka harusnya di bagi sabanyak jumlah report, + // contoh ada 3 report, report ke 1 adalah 5 maka 100/3 dan di looping + } else { + $progressActualWeek = $progressActualWeek > ($keyActualM->bobot_planning * 95) / 100 ? ($keyActualM->bobot_planning * 95) / 100 : $progressActualWeek; + } + $dataActivityActual[] = array( + 'progressActualDay' => $progressActualWeek, + 'qty_act' => $keyActualM->qty_actual, + 'bobot_p' => $keyActualM->bobot_planning, + 'qty_plan' => $keyActualM->qty_plan, + 'status_activity' => $keyActualM->status_activity, + 'sum_qty_actual' => $keyActualM->sum_qty_actual, + 'name' => $keyActualM->name + ); + + $tmpProgressActualWeek += $progressActualWeek; + } + + $progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek, 2); + if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) { + $progressActualKomulatifWeek[] += round($tmpProgressActualWeek, 2); + } + + $dataActivityPlanDate[] = array( + "date" => $loopDay, + "statusWeek" => new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday') ? true : false, + "activity-plan" => $dataActivityPlan, + "activity-actual" => $dataActivityActual, + "tmpProgressActualWeek" => $tmpProgressActualWeek, + "progressPlanWeek" => $tmpProgressPlanWeek + ); + } + + $dataFinal[] = array( + // "date" => $dateWeek, + "proyek_name" => $dataProject->nama, + "data" => [ + "date" => $dateWeek, + "percentagePlan" => $progressPlanKomulatifWeek, + "percentageReal" => $progressActualKomulatifWeek + // "data_details" => $dataActivityPlanDate + ] + ); + + return $dataFinal; + } + + // public function calculateSCurveForProgressTree($hierarchyId) + // { + // DB::enableQueryLog(); + + // // $hierarchyGantts = []; + // if (isset($hierarchyId)) { + // $hierarchy = HierarchyFtth::findOrFail($hierarchyId); + // $projectId = $hierarchy->project_id; + // // if (isset($hierarchy)) { + // // $hierarchyGantts = VersionGantt::where('hierarchy_ftth_id', $hierarchyId)->get()->toArray(); + // // } + // } + + // $dataFinal = []; + // $dataPayload = []; + // $dataPayload['period'] = 'week'; + // $totalACWP = 0; + // $totalBCWP = 0; + // $tempPercentage = []; + + // $dataProject = Project::find($projectId); + // $dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $projectId)->first(); + // if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { + // $dataPayload['end_date'] = $dataProject->akhir_proyek; + // } + + // if ($dataHeader) { + // // $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $projectId)->sum("rencana_biaya"); + // } else { + // // $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $projectId)->sum("rencana_biaya"); + // } + + // $minDate = $dataProject->mulai_proyek; + + // $begin = new \DateTime($minDate); + // $begin = $begin->modify('-1 day'); + // if (isset($dataPayload['end_date'])) { + // $maxDate = $dataPayload['end_date']; + // $end = new \DateTime($maxDate . ' Friday'); + // // $end->modify('next Friday'); + // // $end->modify('next Friday'); + // /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged + // $interval = new \DateInterval('P1D'); + // } else { + // $maxDate = $dataProject->akhir_proyek; + // $end = new \DateTime($maxDate); + // $end = new \DateTime($end->format('Y-m-d') . ' Friday'); + // // $end->modify('next Friday'); + // // $end->modify('next Friday'); + // $interval = new \DateInterval('P1D'); + // } + // $period = new \DatePeriod($begin, $interval, $end); + + // // $arr_ActualM = []; + // $tempDate = []; + // // $tempPercentagePlan = []; + // // $tempPercentagePlanWhr = []; + // // $tempPercentageReal = []; + // // $tempTtlPercentPlan = 0; + // // $tempTtlPercentActual = 0; + + // // $currentACWP = 0; + // // $currentBCWP = 0; + // $dataActivityPlanDate = []; + // $progressPlanKomulatifWeek = []; + // $progressActualKomulatifWeek = []; + // $dateWeek = []; + // $tmpProgressPlanWeek = 0; + // $tmpProgressActualWeek = 0; + // foreach ($period as $dt) { + // $loopDay = $dt->format("Y-m-d"); + // //new \Datetime($dt->format("Y-m-d")); + // // $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); + // $tempDate[] = array($dt->format("Y-m-d")); + // $dataPlanM = []; + // $dataActualM = []; + // // if (count($hierarchyGantts) > 0) { + // // foreach ($hierarchyGantts as $key => $gantt) { + // // $dataPlanM[] = DB::table('m_activity') + // // ->where('type_activity', 'task') + // // ->where('bobot_planning', '>', 0) + // // ->where('version_gantt_id', $gantt['id']) + // // ->whereDate('planned_start', '<=', $loopDay) + // // ->whereDate('planned_end', '>=', $loopDay) + // // ->select('name', 'bobot_planning', 'biaya_actual', 'duration', 'persentase_progress', 'id', 'planned_start', 'planned_end') + // // ->get()->toArray(); + + // // $dataActualM[] = DB::table('report_activity_material as ram') + // // ->join('m_activity as ma', 'ma.id', '=', 'ram.activity_id') + // // ->select('ram.activity_id', 'ram.qty as qty_actual', 'ma.bobot_planning', 'ma.name', + // // DB::raw('(SELECT SUM(amta.qty_planning) FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS qty_plan'), + // // DB::raw('(SELECT SUM(ram.qty) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS sum_qty_actual'), + // // DB::raw('(SELECT DISTINCT status_activity FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS status_activity'), + // // DB::raw('(SELECT COUNT(id) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS count_report') + // // ) + // // ->where('ram.report_date', $loopDay) + // // ->where('ma.version_gantt_id', $gantt['id']) + // // ->get()->toArray(); + // // } + // // } else { + + // $dataPlanM = DB::table('m_hierarchy_ftth as mhf') + // ->join('m_version_gantt as mvg', 'mvg.hierarchy_ftth_id', '=', 'mhf.id') + // ->join('m_activity as ma', 'ma.version_gantt_id', '=', 'mvg.id') + // ->where('ma.type_activity', 'task') + // ->where('ma.bobot_planning', '>', 0) + // ->where('mhf.project_id', $projectId) + // ->whereDate('planned_start', '<=', $loopDay) + // ->whereDate('planned_end', '>=', $loopDay) + // ->select('ma.name', 'ma.bobot_planning', 'ma.biaya_actual', 'ma.duration', 'ma.persentase_progress', 'ma.id', 'ma.planned_start', 'ma.planned_end') + // ->get(); + + // $dataActualM = DB::table('m_hierarchy_ftth as mhf') + // ->join('m_version_gantt as mvg', 'mvg.hierarchy_ftth_id', '=', 'mhf.id') + // ->join('m_activity as ma', 'ma.version_gantt_id', '=', 'mvg.id') + // ->join('report_activity_material as ram', 'ram.activity_id', '=', 'ma.id') + // ->select( + // 'ram.activity_id', + // 'ram.qty as qty_actual', + // 'ma.bobot_planning', + // 'ma.name', + // DB::raw('(SELECT SUM(amta.qty_planning) FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS qty_plan'), + // DB::raw('(SELECT SUM(ram.qty) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS sum_qty_actual'), + // DB::raw('(SELECT DISTINCT status_activity FROM assign_material_to_activity amta WHERE amta.activity_id = ram.activity_id) AS status_activity'), + // DB::raw('(SELECT COUNT(id) FROM report_activity_material ram WHERE ram.activity_id = ma.id) AS count_report') + // ) + // ->where('ram.report_date', $loopDay) + // // ->where('ma.proyek_id', $projectId) + // ->where('mhf.project_id', $projectId) + // ->get(); + // // } + + // $dataActivityPlan = []; + // $dataActivityActual = []; + // $today = date('Y-m-d'); + // if (new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday')) { + + // $progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek, 2); + // if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) { + // // $tempPercentageReal[] = round($tempTtlPercentActual, 2); + // $progressActualKomulatifWeek[] += round($tmpProgressActualWeek, 2); + // } + // $dateWeek[] = [$loopDay]; + // } + // // $progressPlanKomulatifWeek[] += $tmpProgressPlanWeek; + // // if (count($dataPlanM) > 0 && count($dataPlanM[0]) > 0) { + // foreach ($dataPlanM as $keyPlanM) { + // # hitung untuk persentase progress planning + // // if($keyPlanM->duration == 0){ + // // $duration = 2; + // // Tanggal awal + // if (count($keyPlanM) == 0) { + // continue; + // } + // $startDate = new DateTime($keyPlanM->planned_start); + // // Tanggal akhir + // $endDate = new DateTime($keyPlanM->planned_end); + // // Menghitung selisih hari + // $interval = $startDate->diff($endDate); + // // Mengambil hasil selisih hari + // $duration = (int) $interval->days + 1; + // // }else{ + // // $duration = $keyPlanM->duration + 2; + // // } + // // $startPlan = new DateTime($keyPlanM->planned_start); + // // $endPlan = new DateTime($keyPlanM->planned_end); + // // $interval = $startPlan->diff($endPlan); + + // // // Mengambil hasil selisih hari + // // $duration = $interval->days; + // // 2023-07-26 + // $progressPlanWeek = $keyPlanM->bobot_planning / $duration; + // $dataActivityPlan[] = array( + // 'progressPlanDay' => $progressPlanWeek, + // 'name' => $keyPlanM->name, + // 'bobot_p' => $keyPlanM->bobot_planning, + // 'duration' => $keyPlanM->duration + // ); + // $tmpProgressPlanWeek += $progressPlanWeek; + // } + // // } + + // // hitung progress actual + // // if (count($dataActualM) > 0 && count($dataActualM[0]) > 0) { + // foreach ($dataActualM as $keyActualM) { + // if (count($keyPlanM) == 0) { + // continue; + // } + // # hitung untuk persentase progress actual + // // $progressActualWeek = ((((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*100)*$keyActualM->bobot_planning)/100; + // // jika total report > dari planning + // if ($keyActualM->sum_qty_actual > $keyActualM->qty_plan) { + // $progressActualWeek = (($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) * $keyActualM->bobot_planning / 100; + // } else { + // // jika total report < dari planning + // // $progressActualWeek = ((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*$keyActualM->bobot_planning; + // if ($keyActualM->qty_actual == 0) { + // $progressActualWeek = 0; + // } else { + // $progressActualWeek = ($keyActualM->qty_actual / $keyActualM->qty_plan) * $keyActualM->bobot_planning; + // } + // } + // if ($keyActualM->status_activity == 'done') { + // // if($keyActualM->sum_qty_actual > $keyActualM->qty_plan){ + + // // } + // // if($progressActualWeek > $keyActualM->bobot_planning){ + // // $progressActualWeek = $keyActualM->bobot_planning; + // // }else if($keyActualM->qty_actual == 0){ + // // $progressActualWeek = $keyActualM->bobot_planning; + // // }else if($keyActualM->qty_plan == $keyActualM->sum_qty_actual){ + // $progressActualWeek = $keyActualM->bobot_planning / $keyActualM->count_report; + // // }else { + // // $progressActualWeek = $progressActualWeek; + // // } + // // $progressActualWeek = $progressActualWeek > $keyActualM->bobot_planning ? $keyActualM->bobot_planning : $progressActualWeek; + // // jika report lebih dari 1 x, maka harusnya di bagi sabanyak jumlah report, + // // contoh ada 3 report, report ke 1 adalah 5 maka 100/3 dan di looping + // } else { + // $progressActualWeek = $progressActualWeek > ($keyActualM->bobot_planning * 95) / 100 ? ($keyActualM->bobot_planning * 95) / 100 : $progressActualWeek; + // } + // $dataActivityActual[] = array( + // 'progressActualDay' => $progressActualWeek, + // 'qty_act' => $keyActualM->qty_actual, + // 'bobot_p' => $keyActualM->bobot_planning, + // 'qty_plan' => $keyActualM->qty_plan, + // 'status_activity' => $keyActualM->status_activity, + // 'sum_qty_actual' => $keyActualM->sum_qty_actual, + // 'name' => $keyActualM->name + // ); + + // $tmpProgressActualWeek += $progressActualWeek; + // } + // // } + + // $dataActivityPlanDate[] = array( + // "date" => $loopDay, + // "statusWeek" => new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday') ? true : false, + // "activity-plan" => $dataActivityPlan, + // "activity-actual" => $dataActivityActual, + // "tmpProgressActualWeek" => $tmpProgressActualWeek, + // "progressPlanWeek" => $tmpProgressPlanWeek + // ); + // } + + // $dataFinal[] = array( + // // "date" => $dateWeek, + // "proyek_name" => $dataProject->nama, + // "data" => [ + // "date" => $dateWeek, + // "percentagePlan" => $progressPlanKomulatifWeek, + // "percentageReal" => $progressActualKomulatifWeek + // // "data_details" => $dataActivityPlanDate + // ] + // ); + + // return $dataFinal; + // } + + public function calculateSCurveForProgressTree($hierarchyId) + { + $hierarchy = HierarchyFtth::findOrFail($hierarchyId); + $averageProgress = VersionGantt::where('hierarchy_ftth_id', $hierarchy['id']) + ->avg('progress'); + return $averageProgress; + } + + public function calculateProgressBasedOnSimple($keyGantt) + { + DB::enableQueryLog(); + + $dataFinal = []; + $dataPayload = []; + $dataPayload['period'] = 'week'; + + $dataProject = Project::find($keyGantt['proyek_id']); + $dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->first(); + if (isset($dataPayload['end_date']) && $dataPayload['end_date'] > $dataProject->akhir_proyek) { + $dataPayload['end_date'] = $dataProject->akhir_proyek; + } + + if ($dataHeader) { + $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); + } else { + $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); + } + + if (!Activity::where("version_gantt_id", $keyGantt['id'])->first()) + return $dataFinal; + + // $alreadyHasReport = DB::table('report_activity_material as a') + // ->select('a.id') + // ->join('m_activity as b', 'b.id', '=', 'a.activity_id') + // ->where('b.version_gantt_id', '=', $keyGantt['id']) + // ->exists(); + + // if(!$alreadyHasReport) + // return $dataFinal; + + $minDate = Activity::where('version_gantt_id', $keyGantt['id'])->whereNull('parent_id')->pluck('start_date')->first(); + + $begin = new \DateTime($minDate . ' Monday'); + if (isset($dataPayload['end_date'])) { + $maxDate = $dataPayload['end_date']; + $end = new \DateTime($maxDate); + /* $interval = \DateInterval::createFromDateString('1 day'); */ // should be using this but its bugged + $interval = new \DateInterval('P7D'); + } else { + // $maxDate = DB::table('assign_material_to_activity as ama') + // ->where("ama.proyek_id", $keyGantt['proyek_id']) + // ->join('m_activity as a', 'a.id', '=', 'ama.activity_id') + // ->where('a.version_gantt_id', '=', $keyGantt['id']) + // ->max("plan_date"); // plan date overlapped with assign_material_to_activity's, it should be m_activity's + $maxDate = Activity::where('version_gantt_id', $keyGantt['id'])->whereNull('parent_id')->pluck('end_date')->first(); + $end = new \DateTime($maxDate . ' Friday'); + $interval = new \DateInterval('P7D'); + } + $period = new \DatePeriod($begin, $interval, $end); + + $arr_ActualM = []; + $tempDate = []; + $tempPercentage = []; + $tempPercentagePlan = []; + $tempPercentagePlanWhr = []; + $tempPercentageReal = []; + $tempTtlPercentPlan = 0; + $tempTtlPercentActual = 0; + + $currentACWP = 0; + $currentBCWP = 0; + $totalACWP = 0; + $totalBCWP = 0; + foreach ($period as $dt) { + $minSevenDays = new \Datetime($dt->format("Y-m-d")); + $minSevenDays = $minSevenDays->modify('-7 day')->format("Y-m-d"); + + $dataPlanM = DB::table('m_activity') + ->select('id as activity_id', 'bobot_planning', 'start_date', 'biaya_actual', 'duration', 'persentase_progress') + // ->join('m_activity as a', 'a.id', '=', 'activity_id') + ->where('proyek_id', '=', $keyGantt['proyek_id']) + ->where('type_activity', '=', 'task') + ->where('version_gantt_id', '=', $keyGantt['id']) + ->whereDate('start_date', '<=', $dt->format("Y-m-d")) + ->whereDate('start_date', '>', $minSevenDays) + ->get(); + + $dataActualM = DB::table('m_activity as a') + ->select('mapl.id as id_progress_log', 'mapl.activity_id', 'mapl.variance', 'mapl.created_at', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress') + ->join('m_activity_progress_log as mapl', 'a.id', '=', 'mapl.activity_id') + ->where('a.version_gantt_id', '=', $keyGantt['id']) + ->where('a.type_activity', '=', 'task') + ->where('mapl.variance', '>', 0) + ->where('a.proyek_id', '=', $keyGantt['proyek_id']) + ->whereDate('mapl.created_at', '<=', $dt->format("Y-m-d")) + ->whereDate('mapl.created_at', '>', $minSevenDays) + ->get(); + $dataTempPlan = []; + $x = 0; + $sumPercentagePlan = 0; + $totalACWP = isset($totalACWP) ? $totalACWP : 0; + $totalBCWP = isset($totalBCWP) ? $totalBCWP : 0; + + foreach ($dataPlanM as $keyPlanM) { + + $dataTempPlan[$x]['activity_id'] = $keyPlanM->activity_id; + $dataTempPlan[$x]['qty_plan'] = $keyPlanM->bobot_planning; + $dataTempPlan[$x]['plan_date'] = $keyPlanM->start_date; + $dataTempPlan[$x]['start_activity'] = $keyPlanM->start_date; + $dataTempPlan[$x]['bobot_planning'] = $keyPlanM->bobot_planning; + $dataTempPlan[$x]['ttl_plan'] = $keyPlanM->bobot_planning; + $dataTempPlan[$x]['biaya_actual'] = $keyPlanM->biaya_actual; + $dataTempPlan[$x]['duration'] = $keyPlanM->duration; + $dataTempPlan[$x]['persentase_progress'] = $keyPlanM->persentase_progress; + try { + $dataTempPlan[$x]['percentage'] = $keyPlanM->bobot_planning; + $sumPercentagePlan += $keyPlanM->bobot_planning; + $totalBCWP += 0; + $dataTempPlan[$x]['totalBCWP'] = $totalBCWP; + } catch (\DivisionByZeroError $e) { + return response()->json(['message' => $e->getMessage()]); + } + $x++; + } + + $w = 0; + $dataTempReport = []; + $sumPercentageActual = 0; + foreach ($dataActualM as $keyActualM) { + $sumVolActual = DB::table('m_activity_progress_log') + ->select('id', DB::raw('SUM(variance) as ttl_percen_act')) + ->where('id', '=', $keyActualM->id_progress_log) + ->groupBy('id') + ->first(); + $dataTempReport[$w]['id_progress_log'] = $keyActualM->id_progress_log; + // $dataTempReport [$w]['qty'] = $keyActualM->qty; + $dataTempReport[$w]['report_date'] = $keyActualM->created_at; + $dataTempReport[$w]['bobot_planning'] = $keyActualM->bobot_planning; + // $dataTempReport [$w]['ttl_plan'] = $sumVolActual->ttl_percen_act ? $sumVolActual->ttl_percen_act : 0; + $dataTempReport[$w]['biaya_actual'] = $keyActualM->biaya_actual; + $dataTempReport[$w]['duration'] = $keyActualM->duration; + $dataTempReport[$w]['persentase_progress'] = $keyActualM->persentase_progress; + try { + $dataTempReport[$w]['percentage'] = $sumVolActual->ttl_percen_act ? ($sumVolActual->ttl_percen_act / 100) * $keyActualM->bobot_planning : 0; + $sumPercentageActual += $sumVolActual->ttl_percen_act ? ($sumVolActual->ttl_percen_act / 100) * $keyActualM->bobot_planning : 0; + $totalACWP += $keyActualM->biaya_actual / $keyActualM->duration; + } catch (\DivisionByZeroError $e) { + return response()->json(['message' => $e->getMessage()]); + } + $dataTempReport[$w]['totalacwp'] = $totalACWP; + $w++; + } + + $arr_ActualM[] = array( + 'date' => $dt->format("Y-m-d"), + 'percentPlan' => $sumPercentagePlan, + 'percentActual' => $sumPercentageActual, + 'plan' => $dataTempPlan, + 'actual' => $dataTempReport, + ); + if (isset($dataPayload['period']) && $dataPayload['period'] == 'week') { + $tempTtlPercentPlan += $sumPercentagePlan; + $tempTtlPercentActual += $sumPercentageActual; + + if ($tempTtlPercentPlan >= 100 || $tempTtlPercentActual >= 100) { + if ($tempTtlPercentActual >= 100) + $tempTtlPercentActual = 100; + if ($tempTtlPercentPlan >= 100) + $tempTtlPercentPlan = 100; + } + + $currentACWP += $totalACWP; + $currentBCWP += $totalBCWP; + + $tempPercentage[] = array(round($tempTtlPercentPlan, 2), round($tempTtlPercentActual, 2)); + $tempPercentagePlan[] = round($tempTtlPercentPlan, 2); + $tempPercentagePlanWhr[] = ["weekly period", $tempPercentagePlan]; + $tempPercentageReal[] = round($tempTtlPercentActual, 2); + if ($tempTtlPercentPlan >= 100 && $tempTtlPercentActual >= 100) { + break; + } + } else { + $tempPercentage[] = array(round($sumPercentagePlan, 2), round($sumPercentageActual, 2)); + $tempPercentagePlan[] = round($sumPercentagePlan, 2); + $tempPercentageReal[] = round($sumPercentageActual, 2); + } + $tempDate[] = array($dt->format("Y-m-d")); + } + + try { + if (round($totalACWP, 0) > $totalRencanaBudget) { + $estimatedCost = round($totalACWP, 0) + 0; + } else { + $estimatedCost = ($totalRencanaBudget + 0); + } + } catch (\DivisionByZeroError $e) { + return response()->json([ + 'message' => $e->getMessage(), + "line" => 566, + 'gantt' => $keyGantt, + ]); + } + $estimatedCost = $totalACWP > $totalRencanaBudget ? $totalACWP : $totalRencanaBudget; + + $costDeviation = $totalRencanaBudget - $estimatedCost; + if ($costDeviation > 0) { + $potential = "SAVING"; + } else { + $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; + } + + $dataResponse = array( + "date" => $tempDate, + "percentage" => $tempPercentage, + "percentagePlan" => $tempPercentagePlan, + "percentageReal" => $tempPercentageReal, + "data_details" => $arr_ActualM, + "budget_control" => array( + "current_budget" => $totalRencanaBudget, + "acwp" => round($totalACWP, 0), + "bcwp" => round($totalBCWP, 0), + "rem_to_complete" => ($totalRencanaBudget - round($totalACWP, 0)), + "add_cost_to_complete" => 0, + "estimated_at_completion" => $estimatedCost, + "cost_deviation" => $costDeviation, + "potential" => $potential, + ) + ); + + $dataFinal[] = array( + "proyek_name" => $dataProject->nama, + "data" => $dataResponse, + "gantt" => $keyGantt, + ); + + return $dataFinal; + } +} diff --git a/composer.lock b/composer.lock index c223528..6aa48ff 100644 --- a/composer.lock +++ b/composer.lock @@ -8,25 +8,26 @@ "packages": [ { "name": "brick/math", - "version": "0.11.0", + "version": "0.9.3", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", + "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", + "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", "shasum": "" }, "require": { - "php": "^8.0" + "ext-json": "*", + "php": "^7.1 || ^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^9.0", - "vimeo/psalm": "5.0.0" + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", + "vimeo/psalm": "4.9.2" }, "type": "library", "autoload": { @@ -51,38 +52,42 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.11.0" + "source": "https://github.com/brick/math/tree/0.9.3" }, "funding": [ { "url": "https://github.com/BenMorel", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/brick/math", + "type": "tidelift" } ], - "time": "2023-01-15T23:15:59+00:00" + "time": "2021-08-15T20:50:18+00:00" }, { "name": "carbonphp/carbon-doctrine-types", - "version": "3.1.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", - "reference": "a31d3358a2a5d6ae947df1691d1f321418a5f3d5" + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/a31d3358a2a5d6ae947df1691d1f321418a5f3d5", - "reference": "a31d3358a2a5d6ae947df1691d1f321418a5f3d5", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^7.4 || ^8.0" }, "conflict": { - "doctrine/dbal": "<4.0.0 || >=5.0.0" + "doctrine/dbal": "<3.7.0 || >=4.0.0" }, "require-dev": { - "doctrine/dbal": "^4.0.0", + "doctrine/dbal": "^3.7.0", "nesbot/carbon": "^2.71.0 || ^3.0.0", "phpunit/phpunit": "^10.3" }, @@ -112,7 +117,7 @@ ], "support": { "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", - "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.1.0" + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" }, "funding": [ { @@ -128,7 +133,7 @@ "type": "tidelift" } ], - "time": "2023-12-10T15:33:53+00:00" + "time": "2023-12-11T17:09:12+00:00" }, { "name": "classpreloader/classpreloader", @@ -199,16 +204,16 @@ }, { "name": "doctrine/inflector", - "version": "2.0.8", + "version": "2.0.10", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff" + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", + "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", "shasum": "" }, "require": { @@ -270,7 +275,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.8" + "source": "https://github.com/doctrine/inflector/tree/2.0.10" }, "funding": [ { @@ -286,7 +291,7 @@ "type": "tidelift" } ], - "time": "2023-06-16T13:40:37+00:00" + "time": "2024-02-18T20:23:39+00:00" }, { "name": "doctrine/lexer", @@ -2522,107 +2527,36 @@ }, "time": "2023-11-08T14:08:06+00:00" }, - { - "name": "lcobucci/clock", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/clock.git", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", - "shasum": "" - }, - "require": { - "php": "~8.1.0 || ~8.2.0", - "stella-maris/clock": "^0.1.7" - }, - "provide": { - "psr/clock-implementation": "1.0" - }, - "require-dev": { - "infection/infection": "^0.26", - "lcobucci/coding-standard": "^9.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-deprecation-rules": "^1.1.1", - "phpstan/phpstan-phpunit": "^1.3.2", - "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.27" - }, - "type": "library", - "autoload": { - "psr-4": { - "Lcobucci\\Clock\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Luís Cobucci", - "email": "lcobucci@gmail.com" - } - ], - "description": "Yet another clock abstraction", - "support": { - "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/2.3.0" - }, - "funding": [ - { - "url": "https://github.com/lcobucci", - "type": "github" - }, - { - "url": "https://www.patreon.com/lcobucci", - "type": "patreon" - } - ], - "time": "2022-12-19T14:38:11+00:00" - }, { "name": "lcobucci/jwt", - "version": "4.0.4", + "version": "3.3.3", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "55564265fddf810504110bd68ca311932324b0e9" + "reference": "c1123697f6a2ec29162b82f170dd4a491f524773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/55564265fddf810504110bd68ca311932324b0e9", - "reference": "55564265fddf810504110bd68ca311932324b0e9", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/c1123697f6a2ec29162b82f170dd4a491f524773", + "reference": "c1123697f6a2ec29162b82f170dd4a491f524773", "shasum": "" }, "require": { "ext-mbstring": "*", "ext-openssl": "*", - "lcobucci/clock": "^2.0", - "php": "^7.4 || ^8.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "infection/infection": "^0.20", - "lcobucci/coding-standard": "^6.0", - "mikey179/vfsstream": "^1.6", - "phpbench/phpbench": "^0.17", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/php-invoker": "^3.1", - "phpunit/phpunit": "^9.4" + "mikey179/vfsstream": "~1.5", + "phpmd/phpmd": "~2.2", + "phpunit/php-invoker": "~1.1", + "phpunit/phpunit": "^5.7 || ^7.3", + "squizlabs/php_codesniffer": "~2.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2636,7 +2570,7 @@ ], "authors": [ { - "name": "Luís Cobucci", + "name": "Luís Otávio Cobucci Oblonczyk", "email": "lcobucci@gmail.com", "role": "Developer" } @@ -2648,7 +2582,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/4.0.4" + "source": "https://github.com/lcobucci/jwt/tree/3.3.3" }, "funding": [ { @@ -2660,20 +2594,20 @@ "type": "patreon" } ], - "time": "2021-09-28T19:18:28+00:00" + "time": "2020-08-20T13:22:28+00:00" }, { "name": "monolog/monolog", - "version": "2.9.2", + "version": "2.9.3", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f" + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a30bfe2e142720dfa990d0a7e573997f5d884215", + "reference": "a30bfe2e142720dfa990d0a7e573997f5d884215", "shasum": "" }, "require": { @@ -2694,8 +2628,8 @@ "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8.5.38 || ^9.6.19", "predis/predis": "^1.1 || ^2.0", "rollbar/rollbar": "^1.3 || ^2 || ^3", "ruflin/elastica": "^7", @@ -2750,7 +2684,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.2" + "source": "https://github.com/Seldaek/monolog/tree/2.9.3" }, "funding": [ { @@ -2762,7 +2696,7 @@ "type": "tidelift" } ], - "time": "2023-10-27T15:25:26+00:00" + "time": "2024-04-12T20:52:51+00:00" }, { "name": "namshi/jose", @@ -2833,16 +2767,16 @@ }, { "name": "nesbot/carbon", - "version": "2.72.1", + "version": "2.72.5", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "2b3b3db0a2d0556a177392ff1a3bf5608fa09f78" + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/2b3b3db0a2d0556a177392ff1a3bf5608fa09f78", - "reference": "2b3b3db0a2d0556a177392ff1a3bf5608fa09f78", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/afd46589c216118ecd48ff2b95d77596af1e57ed", + "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed", "shasum": "" }, "require": { @@ -2876,8 +2810,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.x-dev" + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev" }, "laravel": { "providers": [ @@ -2936,7 +2870,7 @@ "type": "tidelift" } ], - "time": "2023-12-08T23:47:49+00:00" + "time": "2024-06-03T19:18:41+00:00" }, { "name": "nikic/fast-route", @@ -2990,21 +2924,21 @@ }, { "name": "nikic/php-parser", - "version": "v4.18.0", + "version": "v4.19.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4e1b88d21c69391150ace211e9eaf05810858d0b", + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.1" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", @@ -3040,9 +2974,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.1" }, - "time": "2023-12-10T21:03:43+00:00" + "time": "2024-03-17T08:10:35+00:00" }, { "name": "opis/closure", @@ -3384,20 +3318,20 @@ }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -3421,7 +3355,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -3433,9 +3367,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -3492,30 +3426,30 @@ }, { "name": "psr/log", - "version": "2.0.0", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3536,9 +3470,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/2.0.0" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2021-07-14T16:41:46+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "psr/simple-cache", @@ -3712,20 +3646,21 @@ }, { "name": "ramsey/collection", - "version": "2.0.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" + "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "url": "https://api.github.com/repos/ramsey/collection/zipball/ad7475d1c9e70b190ecffc58f2d989416af339b4", + "reference": "ad7475d1c9e70b190ecffc58f2d989416af339b4", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^7.4 || ^8.0", + "symfony/polyfill-php81": "^1.23" }, "require-dev": { "captainhook/plugin-composer": "^5.3", @@ -3785,7 +3720,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.0.0" + "source": "https://github.com/ramsey/collection/tree/1.3.0" }, "funding": [ { @@ -3797,27 +3732,29 @@ "type": "tidelift" } ], - "time": "2022-12-31T21:50:55+00:00" + "time": "2022-12-27T19:12:24+00:00" }, { "name": "ramsey/uuid", - "version": "4.7.5", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "brick/math": "^0.8 || ^0.9", "ext-json": "*", - "php": "^8.0", - "ramsey/collection": "^1.2 || ^2.0" + "php": "^7.2 || ^8.0", + "ramsey/collection": "^1.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php80": "^1.14" }, "replace": { "rhumsaa/uuid": "self.version" @@ -3829,23 +3766,24 @@ "doctrine/annotations": "^1.8", "ergebnis/composer-normalize": "^2.15", "mockery/mockery": "^1.3", + "moontoast/math": "^1.1", "paragonie/random-lib": "^2", "php-mock/php-mock": "^2.2", "php-mock/php-mock-mockery": "^1.3", "php-parallel-lint/php-parallel-lint": "^1.1", "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-phpunit": "^1.1", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", "phpunit/phpunit": "^8.5 || ^9", - "ramsey/composer-repl": "^1.4", - "slevomat/coding-standard": "^8.4", + "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5", "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -3853,6 +3791,9 @@ }, "type": "library", "extra": { + "branch-alias": { + "dev-main": "4.x-dev" + }, "captainhook": { "force-install": true } @@ -3877,7 +3818,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.5" + "source": "https://github.com/ramsey/uuid/tree/4.2.3" }, "funding": [ { @@ -3889,67 +3830,20 @@ "type": "tidelift" } ], - "time": "2023-11-08T05:53:05+00:00" - }, - { - "name": "stella-maris/clock", - "version": "0.1.7", - "source": { - "type": "git", - "url": "https://github.com/stella-maris-solutions/clock.git", - "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stella-maris-solutions/clock/zipball/fa23ce16019289a18bb3446fdecd45befcdd94f8", - "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8", - "shasum": "" - }, - "require": { - "php": "^7.0|^8.0", - "psr/clock": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "StellaMaris\\Clock\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Heigl", - "role": "Maintainer" - } - ], - "description": "A pre-release of the proposed PSR-20 Clock-Interface", - "homepage": "https://gitlab.com/stella-maris/clock", - "keywords": [ - "clock", - "datetime", - "point in time", - "psr20" - ], - "support": { - "source": "https://github.com/stella-maris-solutions/clock/tree/0.1.7" - }, - "time": "2022-11-25T16:15:06+00:00" + "time": "2021-09-25T23:10:38+00:00" }, { "name": "symfony/console", - "version": "v5.4.32", + "version": "v5.4.41", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7" + "reference": "6473d441a913cb997123b59ff2dbe3d1cf9e11ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", - "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", + "url": "https://api.github.com/repos/symfony/console/zipball/6473d441a913cb997123b59ff2dbe3d1cf9e11ba", + "reference": "6473d441a913cb997123b59ff2dbe3d1cf9e11ba", "shasum": "" }, "require": { @@ -4019,7 +3913,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.32" + "source": "https://github.com/symfony/console/tree/v5.4.41" }, "funding": [ { @@ -4035,29 +3929,29 @@ "type": "tidelift" } ], - "time": "2023-11-18T18:23:04+00:00" + "time": "2024-06-28T07:48:55+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.4.0", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4086,7 +3980,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" }, "funding": [ { @@ -4102,20 +3996,20 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2023-01-24T14:02:46+00:00" }, { "name": "symfony/error-handler", - "version": "v5.4.29", + "version": "v5.4.41", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "328c6fcfd2f90b64c16efaf0ea67a311d672f078" + "reference": "c25da5cc2de4e6f96b3a0a2813050355a20dd0e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/328c6fcfd2f90b64c16efaf0ea67a311d672f078", - "reference": "328c6fcfd2f90b64c16efaf0ea67a311d672f078", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/c25da5cc2de4e6f96b3a0a2813050355a20dd0e1", + "reference": "c25da5cc2de4e6f96b3a0a2813050355a20dd0e1", "shasum": "" }, "require": { @@ -4157,7 +4051,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.29" + "source": "https://github.com/symfony/error-handler/tree/v5.4.41" }, "funding": [ { @@ -4173,43 +4067,48 @@ "type": "tidelift" } ], - "time": "2023-09-06T21:54:06+00:00" + "time": "2024-06-09T18:59:35+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.4.0", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d76d2632cfc2206eecb5ad2b26cd5934082941b6" + "reference": "a54e2a8a114065f31020d6a89ede83e34c3b27a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d76d2632cfc2206eecb5ad2b26cd5934082941b6", - "reference": "d76d2632cfc2206eecb5ad2b26cd5934082941b6", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a54e2a8a114065f31020d6a89ede83e34c3b27a4", + "reference": "a54e2a8a114065f31020d6a89ede83e34c3b27a4", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/event-dispatcher-contracts": "^2.5|^3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", + "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/service-contracts": "<2.5" + "symfony/dependency-injection": "<4.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^5.4|^6.0|^7.0" + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^4.4|^5.0|^6.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" }, "type": "library", "autoload": { @@ -4237,7 +4136,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.40" }, "funding": [ { @@ -4253,30 +4152,33 @@ "type": "tidelift" } ], - "time": "2023-07-27T06:52:43+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.4.0", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + "reference": "540f4c73e87fd0c71ca44a6aa305d024ac68cb73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/540f4c73e87fd0c71ca44a6aa305d024ac68cb73", + "reference": "540f4c73e87fd0c71ca44a6aa305d024ac68cb73", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=7.2.5", "psr/event-dispatcher": "^1" }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4313,7 +4215,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.3" }, "funding": [ { @@ -4329,20 +4231,20 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/finder", - "version": "v5.4.27", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" + "reference": "f51cff4687547641c7d8180d74932ab40b2205ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", - "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "url": "https://api.github.com/repos/symfony/finder/zipball/f51cff4687547641c7d8180d74932ab40b2205ce", + "reference": "f51cff4687547641c7d8180d74932ab40b2205ce", "shasum": "" }, "require": { @@ -4376,7 +4278,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.27" + "source": "https://github.com/symfony/finder/tree/v5.4.40" }, "funding": [ { @@ -4392,20 +4294,20 @@ "type": "tidelift" } ], - "time": "2023-07-31T08:02:31+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.32", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "cbcd80a4c36f59772d62860fdb0cb6a38da63fd2" + "reference": "cf4893ca4eca3fac4ae06da1590afdbbb4217847" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cbcd80a4c36f59772d62860fdb0cb6a38da63fd2", - "reference": "cbcd80a4c36f59772d62860fdb0cb6a38da63fd2", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cf4893ca4eca3fac4ae06da1590afdbbb4217847", + "reference": "cf4893ca4eca3fac4ae06da1590afdbbb4217847", "shasum": "" }, "require": { @@ -4415,7 +4317,7 @@ "symfony/polyfill-php80": "^1.16" }, "require-dev": { - "predis/predis": "~1.0", + "predis/predis": "^1.0|^2.0", "symfony/cache": "^4.4|^5.0|^6.0", "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^4.4|^5.0|^6.0", @@ -4452,7 +4354,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.32" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.40" }, "funding": [ { @@ -4468,20 +4370,20 @@ "type": "tidelift" } ], - "time": "2023-11-20T15:40:25+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.33", + "version": "v5.4.41", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "892636f9279f953dc266dc088f900b03eecb4ffa" + "reference": "aad4078e1210343b7cd5acb803c02f8b02f002b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/892636f9279f953dc266dc088f900b03eecb4ffa", - "reference": "892636f9279f953dc266dc088f900b03eecb4ffa", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aad4078e1210343b7cd5acb803c02f8b02f002b2", + "reference": "aad4078e1210343b7cd5acb803c02f8b02f002b2", "shasum": "" }, "require": { @@ -4530,6 +4432,7 @@ "symfony/stopwatch": "^4.4|^5.0|^6.0", "symfony/translation": "^4.4|^5.0|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/var-dumper": "^4.4.31|^5.4", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -4564,7 +4467,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.33" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.41" }, "funding": [ { @@ -4580,20 +4483,20 @@ "type": "tidelift" } ], - "time": "2023-12-01T16:51:11+00:00" + "time": "2024-06-28T11:42:41+00:00" }, { "name": "symfony/mime", - "version": "v5.4.26", + "version": "v5.4.41", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2" + "reference": "c71c7a1aeed60b22d05e738197e31daf2120bd42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/2ea06dfeee20000a319d8407cea1d47533d5a9d2", - "reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2", + "url": "https://api.github.com/repos/symfony/mime/zipball/c71c7a1aeed60b22d05e738197e31daf2120bd42", + "reference": "c71c7a1aeed60b22d05e738197e31daf2120bd42", "shasum": "" }, "require": { @@ -4608,15 +4511,16 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<4.4", - "symfony/serializer": "<5.4.26|>=6,<6.2.13|>=6.3,<6.3.2" + "symfony/serializer": "<5.4.35|>=6,<6.3.12|>=6.4,<6.4.3" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/process": "^5.4|^6.4", "symfony/property-access": "^4.4|^5.1|^6.0", "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.4.26|~6.2.13|^6.3.2" + "symfony/serializer": "^5.4.35|~6.3.12|^6.4.3" }, "type": "library", "autoload": { @@ -4648,7 +4552,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.26" + "source": "https://github.com/symfony/mime/tree/v5.4.41" }, "funding": [ { @@ -4664,20 +4568,20 @@ "type": "tidelift" } ], - "time": "2023-07-27T06:29:31+00:00" + "time": "2024-06-28T09:36:24+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -4691,9 +4595,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4730,7 +4631,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { @@ -4746,20 +4647,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", "shasum": "" }, "require": { @@ -4770,9 +4671,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4811,7 +4709,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" }, "funding": [ { @@ -4827,20 +4725,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", "shasum": "" }, "require": { @@ -4853,9 +4751,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4898,7 +4793,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" }, "funding": [ { @@ -4914,20 +4809,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:30:37+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", "shasum": "" }, "require": { @@ -4938,9 +4833,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4982,7 +4874,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" }, "funding": [ { @@ -4998,20 +4890,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -5025,9 +4917,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5065,7 +4954,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -5081,7 +4970,7 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php56", @@ -5153,16 +5042,16 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" + "reference": "10112722600777e02d2745716b70c5db4ca70442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", - "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442", + "reference": "10112722600777e02d2745716b70c5db4ca70442", "shasum": "" }, "require": { @@ -5170,9 +5059,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5209,7 +5095,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.30.0" }, "funding": [ { @@ -5225,20 +5111,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/ec444d3f3f6505bb28d11afa41e75faadebc10a1", + "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1", "shasum": "" }, "require": { @@ -5246,9 +5132,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5288,7 +5171,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.30.0" }, "funding": [ { @@ -5304,20 +5187,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -5325,9 +5208,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -5371,7 +5251,83 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T15:07:36+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.30.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" }, "funding": [ { @@ -5387,20 +5343,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/process", - "version": "v5.4.28", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" + "reference": "deedcb3bb4669cae2148bc920eafd2b16dc7c046" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "url": "https://api.github.com/repos/symfony/process/zipball/deedcb3bb4669cae2148bc920eafd2b16dc7c046", + "reference": "deedcb3bb4669cae2148bc920eafd2b16dc7c046", "shasum": "" }, "require": { @@ -5433,7 +5389,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.28" + "source": "https://github.com/symfony/process/tree/v5.4.40" }, "funding": [ { @@ -5449,20 +5405,20 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:36:04+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", "shasum": "" }, "require": { @@ -5516,7 +5472,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" }, "funding": [ { @@ -5532,38 +5488,38 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2023-04-21T15:04:16+00:00" }, { "name": "symfony/string", - "version": "v6.4.0", + "version": "v5.4.41", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809" + "reference": "065a9611e0b1fd2197a867e1fb7f2238191b7096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b45fcf399ea9c3af543a92edf7172ba21174d809", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809", + "url": "https://api.github.com/repos/symfony/string/zipball/065a9611e0b1fd2197a867e1fb7f2238191b7096", + "reference": "065a9611e0b1fd2197a867e1fb7f2238191b7096", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" }, "conflict": { - "symfony/translation-contracts": "<2.5" + "symfony/translation-contracts": ">=3.0" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/intl": "^6.2|^7.0", - "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0|^7.0" + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" }, "type": "library", "autoload": { @@ -5602,7 +5558,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.0" + "source": "https://github.com/symfony/string/tree/v5.4.41" }, "funding": [ { @@ -5618,55 +5574,57 @@ "type": "tidelift" } ], - "time": "2023-11-28T20:41:49+00:00" + "time": "2024-06-28T09:20:55+00:00" }, { "name": "symfony/translation", - "version": "v6.4.0", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37" + "reference": "bb51d7f183756d1ac03f50ea47dc5726518cc7e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37", - "reference": "b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37", + "url": "https://api.github.com/repos/symfony/translation/zipball/bb51d7f183756d1ac03f50ea47dc5726518cc7e8", + "reference": "bb51d7f183756d1ac03f50ea47dc5726518cc7e8", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^2.5|^3.0" + "symfony/polyfill-php80": "^1.16", + "symfony/translation-contracts": "^2.3" }, "conflict": { - "symfony/config": "<5.4", - "symfony/console": "<5.4", - "symfony/dependency-injection": "<5.4", - "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<5.4", - "symfony/service-contracts": "<2.5", - "symfony/twig-bundle": "<5.4", - "symfony/yaml": "<5.4" + "symfony/config": "<4.4", + "symfony/console": "<5.3", + "symfony/dependency-injection": "<5.0", + "symfony/http-kernel": "<5.0", + "symfony/twig-bundle": "<5.0", + "symfony/yaml": "<4.4" }, "provide": { - "symfony/translation-implementation": "2.3|3.0" + "symfony/translation-implementation": "2.3" }, "require-dev": { - "nikic/php-parser": "^4.13", "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", - "symfony/http-client-contracts": "^2.5|^3.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/intl": "^5.4|^6.0|^7.0", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/http-client-contracts": "^1.1|^2.0|^3.0", + "symfony/http-kernel": "^5.0|^6.0", + "symfony/intl": "^4.4|^5.0|^6.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^5.4|^6.0|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/service-contracts": "^1.1.2|^2|^3", + "symfony/yaml": "^4.4|^5.0|^6.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" }, "type": "library", "autoload": { @@ -5697,7 +5655,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.0" + "source": "https://github.com/symfony/translation/tree/v5.4.40" }, "funding": [ { @@ -5713,29 +5671,32 @@ "type": "tidelift" } ], - "time": "2023-11-29T08:14:36+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.4.0", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5" + "reference": "b0073a77ac0b7ea55131020e87b1e3af540f4664" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/dee0c6e5b4c07ce851b462530088e64b255ac9c5", - "reference": "dee0c6e5b4c07ce851b462530088e64b255ac9c5", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b0073a77ac0b7ea55131020e87b1e3af540f4664", + "reference": "b0073a77ac0b7ea55131020e87b1e3af540f4664", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.2.5" + }, + "suggest": { + "symfony/translation-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -5745,10 +5706,7 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5775,7 +5733,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/translation-contracts/tree/v2.5.3" }, "funding": [ { @@ -5791,20 +5749,20 @@ "type": "tidelift" } ], - "time": "2023-07-25T15:08:44+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.29", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "6172e4ae3534d25ee9e07eb487c20be7760fcc65" + "reference": "af8868a6e9d6082dfca11f1a1f205ae93a8b6d93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/6172e4ae3534d25ee9e07eb487c20be7760fcc65", - "reference": "6172e4ae3534d25ee9e07eb487c20be7760fcc65", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/af8868a6e9d6082dfca11f1a1f205ae93a8b6d93", + "reference": "af8868a6e9d6082dfca11f1a1f205ae93a8b6d93", "shasum": "" }, "require": { @@ -5864,7 +5822,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.29" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.40" }, "funding": [ { @@ -5880,41 +5838,39 @@ "type": "tidelift" } ], - "time": "2023-09-12T10:09:58+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "tymon/jwt-auth", - "version": "dev-develop", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/tymondesigns/jwt-auth.git", - "reference": "014be8d493d228d14bbc291b24e835d330c092a0" + "reference": "e588cb719539366c0e2f6017f975379cb73e9680" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/014be8d493d228d14bbc291b24e835d330c092a0", - "reference": "014be8d493d228d14bbc291b24e835d330c092a0", + "url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/e588cb719539366c0e2f6017f975379cb73e9680", + "reference": "e588cb719539366c0e2f6017f975379cb73e9680", "shasum": "" }, "require": { - "illuminate/auth": "^5.2|^6|^7|^8|^9", - "illuminate/contracts": "^5.2|^6|^7|^8|^9", - "illuminate/http": "^5.2|^6|^7|^8|^9", - "illuminate/support": "^5.2|^6|^7|^8|^9", - "lcobucci/jwt": "^3.4|^4.0", + "illuminate/auth": "^5.2|^6|^7|^8", + "illuminate/contracts": "^5.2|^6|^7|^8", + "illuminate/http": "^5.2|^6|^7|^8", + "illuminate/support": "^5.2|^6|^7|^8", + "lcobucci/jwt": "<3.4", "namshi/jose": "^7.0", "nesbot/carbon": "^1.0|^2.0", - "php": "^7.4|^8.0" + "php": "^5.5.9|^7.0" }, "require-dev": { - "illuminate/console": "^5.2|^6|^7|^8|^9", - "illuminate/database": "^5.2|^6|^7|^8|^9", - "illuminate/routing": "^5.2|^6|^7|^8|^9", + "illuminate/console": "^5.2|^6|^7|^8", + "illuminate/database": "^5.2|^6|^7|^8", + "illuminate/routing": "^5.2|^6|^7|^8", "mockery/mockery": ">=0.9.9", - "phpunit/phpunit": "^8.5|^9.4", - "yoast/phpunit-polyfills": "^0.2.0" + "phpunit/phpunit": "~4.8|~6.0" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -5966,7 +5922,7 @@ "type": "patreon" } ], - "time": "2022-04-27T08:53:50+00:00" + "time": "2020-11-27T12:32:42+00:00" }, { "name": "vlucas/phpdotenv", @@ -6273,30 +6229,30 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "2.0.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^11", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -6323,7 +6279,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -6339,20 +6295,20 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:23:10+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "fakerphp/faker", - "version": "v1.23.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01" + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { @@ -6378,11 +6334,6 @@ "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.21-dev" - } - }, "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -6405,9 +6356,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, - "time": "2023-06-12T08:44:38+00:00" + "time": "2024-01-02T13:46:09+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -6462,16 +6413,16 @@ }, { "name": "mockery/mockery", - "version": "1.6.7", + "version": "1.6.12", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06" + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", - "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", "shasum": "" }, "require": { @@ -6483,8 +6434,8 @@ "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.6.10", - "symplify/easy-coding-standard": "^12.0.8" + "phpunit/phpunit": "^8.5 || ^9.6.17", + "symplify/easy-coding-standard": "^12.1.14" }, "type": "library", "autoload": { @@ -6541,20 +6492,20 @@ "security": "https://github.com/mockery/mockery/security/advisories", "source": "https://github.com/mockery/mockery" }, - "time": "2023-12-10T02:24:34+00:00" + "time": "2024-05-16T03:13:13+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -6562,11 +6513,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -6592,7 +6544,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -6600,24 +6552,25 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -6658,9 +6611,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -6715,16 +6674,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.30", + "version": "9.2.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { @@ -6781,7 +6740,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" }, "funding": [ { @@ -6789,7 +6748,7 @@ "type": "github" } ], - "time": "2023-12-22T06:47:57+00:00" + "time": "2024-03-02T06:37:42+00:00" }, { "name": "phpunit/php-file-iterator", @@ -7034,45 +6993,45 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.15", + "version": "9.6.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1" + "reference": "49d7820565836236411f5dc002d16dd689cde42f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1", - "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/49d7820565836236411f5dc002d16dd689cde42f", + "reference": "49d7820565836236411f5dc002d16dd689cde42f", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", + "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-code-coverage": "^9.2.31", + "phpunit/php-file-iterator": "^3.0.6", "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", "sebastian/version": "^3.0.2" }, "suggest": { @@ -7117,7 +7076,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.15" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.20" }, "funding": [ { @@ -7133,20 +7092,20 @@ "type": "tidelift" } ], - "time": "2023-12-01T16:55:19+00:00" + "time": "2024-07-10T11:45:39+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -7181,7 +7140,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -7189,7 +7148,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -7435,16 +7394,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -7489,7 +7448,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -7497,7 +7456,7 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -7564,16 +7523,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -7629,7 +7588,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -7637,20 +7596,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -7693,7 +7652,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -7701,7 +7660,7 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", @@ -7937,16 +7896,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -7958,7 +7917,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -7979,8 +7938,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -7988,7 +7946,7 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", @@ -8101,16 +8059,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -8139,7 +8097,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -8147,7 +8105,7 @@ "type": "github" } ], - "time": "2023-11-20T00:12:19+00:00" + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [],