Download the PHP package ernestdefoe/gameday without Composer

On this page you can find all versions of the php package ernestdefoe/gameday. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package gameday

Game Day

A thread for every game, opened before kickoff and finished with a recap that says how the game was won.

Game Day reads the fixtures and box scores that Picks already syncs from CollegeFootballData. It reaches nothing itself — Picks owns the provider, the API key and the call budget, and one place is what makes a budget enforceable.

What it does

Opens a thread before kickoff. An ordinary discussion, in the home team's tag, three hours out by default. Ordinary is the point: it is quotable, searchable, moderatable, and still there if this extension is removed.

Says the game is on. Flarum has no live state for a discussion, so this does not pretend to have ported one — it sticks the thread while the game is being played and unsticks it afterwards, which says the same thing in a way readers already understand. Needs flarum/sticky; without it the setting says so.

Finishes it with a recap that is worth reading. A real one, written from a real box score:

The recap is posted the moment a game settles and rewritten in place when the box score arrives — the provider publishes statistics minutes to hours after the final whistle, and waiting would delay the one thing everybody in the thread is waiting for. A game the provider never covered simply keeps the score.

Where to watch

The scoreboard at the head of every game thread says where the game is on, and gets people there in one tap:

Each channel is a chip — TV, streaming or radio, national listings first and local ones labelled with their team's area — and the Watch button opens that network's own live page in a new tab: ESPN's watch page (or the game itself in ESPN's player, when the feed carries that link), FOX Sports for FOX, FS1 and the Big Ten Network, CBS Sports for CBS and CBS Sports Network, Peacock for NBC, and so on. Services that are nothing but a subscription — ESPN+, Peacock, Prime Video — are marked as one. Nothing here says a game is free.

No video is embedded. Live rights are sold per market and wrapped in DRM, and a forum cannot carry a broadcast; it can say where one is. The listings come from the scoreboard payload Picks already fetches, so drawing them costs no request. After the final whistle the row shrinks to a record of where it was shown, and a game with no listing shows nothing at all. On a phone the chips wrap and the button takes its own line:

The scoreboard widget shows the chips on each card, and the button only when it is showing a single game.

Highlights

Once a game is final, the clips ESPN publishes for it appear under the scoreboard — the full-game package first, then the plays in order, up to six:

Each clip is a thumbnail until somebody presses play, and only then becomes ESPN's own syndicated player, so a thread does not load six video players before anyone has chosen one. Clips arrive minutes to hours after the final, so the hourly pass keeps looking for a day after the game, at most every 45 minutes per thread. They are drawn by the thread itself and never written into the recap post: post text is parsed, and a feed's markup does not belong in it.

Both are on by default. Admin → Game Day turns either off, and limits where to watch to particular leagues:

More than one sport

The recap's structure is fixed — a score, a result, a sentence on how it went, the players worth naming, a comparison — and its words come from the sport.

Here is the same code on a Premier League match, from the same afternoon:

American football talks about yards, turnovers and a quarterback's line. Soccer talks about shots, possession and yellow cards, treats a draw as an ordinary result rather than a curiosity, and names no players at all, because ESPN's match summary carries no player breakdown to name one from. Basketball, baseball and ice hockey each have their own words and their own thresholds — three points is a rout in football and a coin toss in basketball.

Which sport a game is described in comes from its season's league in Picks, so a board following the NFL and the Premier League gets both right on the same Sunday. Admin → Game Day → Sport is the fallback, for a season created before leagues existed.

Adding a league is a class implementing Service\Sports\Sport and one line in Service\Sports\Sports — an extension can register its own without editing a file it does not own, and the admin dropdown picks it up from the server rather than from a second list in the JavaScript.

Everything below the score is earned. A yardage line is only printed when the two are far enough apart to mean something; a turnover line only when somebody actually lost the ball; a comparison line only when at least one side has the figure. A recap that always has three sentences has three sentences of nothing on the day nothing happened.

Installing

Then in Admin → Game Day: switch it on, set the member the threads are posted as, and map each team to a tag. Nothing is posted until it is on, and there is no default author on purpose — posting as whoever happens to be user 1 puts a founder's name on a hundred threads they did not write.

Two commands run on Flarum's scheduler and need nothing else:

Requires

Tests

The recap is a pure function of a game and its box score, so it is tested without a database, a network or Flarum:

The box score is CollegeFootballData's real answer for that Notre Dame game, normalised by Picks' own code rather than typed by hand. The same assertions run on the Convoro build of Game Day, which is how the two are kept saying the same things.

Licence

MIT.


All versions of gameday with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
flarum/core Version ^2.0
ernestdefoe/picks Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ernestdefoe/gameday contains the following files

Loading the files please wait ...