Skip to content

Fix: Move class into src/ #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bin/createNewsEntry
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<?php
PHP_SAPI == 'cli' or die("Please run this script using the cli sapi");

require(__DIR__ . '/../include/news_entry.inc');
use phpweb\news\Entry;
require_once __DIR__ . '/../src/News/Entry.php';

use phpweb\News\Entry;

$imageRestriction = [
'width' => 400,
Expand Down
5 changes: 3 additions & 2 deletions bin/createReleaseEntry
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<?php
PHP_SAPI == 'cli' or die("Please run this script using the cli sapi");

require(__DIR__ . '/../include/news_entry.inc');
use phpweb\news\Entry;
require_once __DIR__ . '/../src/News/Entry.php';

use phpweb\News\Entry;

if (!file_exists(Entry::ARCHIVE_FILE_ABS)) {
fwrite(STDERR, "Can't find " . Entry::ARCHIVE_FILE_REL . ", are you sure you are in phpweb/?\n");
Expand Down
4 changes: 2 additions & 2 deletions include/news_entry.inc β†’ src/News/Entry.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace phpweb\news;
namespace phpweb\News;

class Entry {
const CATEGORIES = [
Expand All @@ -11,7 +11,7 @@ class Entry {
];

const WEBROOT = "https://www.php.net";
const PHPWEB = __DIR__ . '/../';
const PHPWEB = __DIR__ . '/../../';
const ARCHIVE_FILE_REL = 'archive/archive.xml';
const ARCHIVE_FILE_ABS = self::PHPWEB . self::ARCHIVE_FILE_REL;
const ARCHIVE_ENTRIES_REL = 'archive/entries/';
Expand Down