The essential news about content management systems and mobile technology. Powered by Perfect Publisher and XT Search for Algolia.
The News Site publishes posts to the following channels: Facebook, Instagram, Twitter, Telegram, Web Push, Bluesky, and Blogger.
Read more https://build.prestashop-project.org/news/2024/live-update-november-2024/
Spam bots and denial-of-service attacks are a reality for many website owners. Depending on timing and scale, they can be an annoyance or a detriment to your business’s bottom line. Services like Cloudflare, Fastly, and Vercel are popular choices for mitigating these attacks with sophisticated techniques beyond the firewall rules many hosts (WordPress.com included) employ to examine and potentially block incoming traffic.
WordPress.com’s defensive mode introduces similar, sophisticated DDoS protection that further enhances your site’s security. It works by issuing proof-of-work challenges to browsers visiting the site. Legitimate users will briefly see a challenge page while their browser completes the work before accessing the site. The feature is powered by our global edge network, but it can still be enabled independently of our global edge cache feature.
If you notice an inordinate amount of traffic to your website that is slowing it down, this setting filters spam traffic by requesting that they complete a proof-of-work challenge. When visitors come to your website for the first time, they will see the following screen:
This proof-of-work challenge page has a unique random puzzle embedded in it, along with JavaScript that can solve the puzzle. The puzzles are designed to take a typical CPU a few seconds to solve, and they deter botnets, which are not able to run the scripts to solve the puzzles.
This system protects all sites hosted on WordPress.com. Sites on Free, Personal, and Premium hosting plans are managed for you. For sites on Business or Commerce hosting plans, this setting can also be managed manually from your site’s Hosting Dashboard.
Here’s how to enable it:
Note that WordPress.com staff may proactively enable defensive mode on your behalf, regardless of what hosting plan you have, if your site is attacked.
Many hosts charge extra for capabilities like this, or they require integration with a third-party provider. On WordPress.com, defensive mode is included on every plan and can be managed manually on Business and Commerce plans.
Host with WordPress.comThis is just one more reason why WordPress.com stands out as the premier managed host for WordPress sites. With staging sites, SSH and WP-CLI access, or GitHub deployments, we’re always working on new tools to make WordPress.com an essential component of your development workflow.
What other features would you like to see on WordPress.com? How can we make WordPress.com an even more powerful place to build a website? Let us know in the comments below.
Read more https://wordpress.com/blog/2024/12/03/ddos-protection/
The packagist team announced it's shutting down support for Composer v1.x on February 25th, 2025.
Composer 1.x has served the PHP community well, but with Composer 2.0 released four years ago in October 2020, it's time to move forward. As of today, more than 95% of Composer updates are using v2, benefiting from its significant improvements in performance, memory usage, and security.
Composer 1.x suffers from architectural problems making it hard to manage a package repository with now 400,000 packages and over 4.5 million versions. So we deprecated Composer 1.x support in February 2021 and introduced delays to metadata updates and restricted access to new packages. To focus our efforts on supporting and enhancing Composer 2.x, we are now announcing the complete shutdown of Composer 1.x metadata access on Packagist.org.
The key dates moving forward are:
As mentioned in their announcement, 96% of Composer updates use v2, so there is a good chance you will not be affected by this. However, if you have legacy apps, checking and ensuring they are on v2 would be good. If not, then update them before the key dates.
The post Packagist.org is ending support for Composer 1.x appeared first on Laravel News.
Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.
Read more https://laravel-news.com/packagistorg-is-ending-support-for-composer-1x
When processing extensive data in Laravel applications, memory management becomes critical. Laravel's LazyCollection provides an efficient solution by loading data on demand rather than all at once. Let's explore this powerful feature for handling large datasets effectively.
LazyCollection, a feature available since Laravel 6.0, enables efficient processing of substantial datasets by loading items only when needed. This makes it ideal for handling large files or extensive database queries without overwhelming your application's memory.
use Illuminate\Support\LazyCollection;
LazyCollection::make(function () {
$handle = fopen('data.csv', 'r');
while (($row = fgets($handle)) !== false) {
yield str_getcsv($row);
}
})->each(function ($row) {
// Process row data
});
Let's explore a practical example where we process a large transaction log file and generate reports:
<?php
namespace App\Services;
use App\Models\TransactionLog;
use Illuminate\Support\LazyCollection;
class TransactionProcessor
{
public function processLogs(string $filename)
{
return LazyCollection::make(function () use ($filename) {
$handle = fopen($filename, 'r');
while (($line = fgets($handle)) !== false) {
yield json_decode($line, true);
}
})
->map(function ($log) {
return [
'transaction_id' => $log['id'],
'amount' => $log['amount'],
'status' => $log['status'],
'processed_at' => $log['timestamp']
];
})
->filter(function ($log) {
return $log['status'] === 'completed';
})
->chunk(500)
->each(function ($chunk) {
TransactionLog::insert($chunk->all());
});
}
}
Using this approach, we can:
For database operations, Laravel provides the cursor() method to create lazy collections:
<?php
namespace App\Http\Controllers;
use App\Models\Transaction;
use Illuminate\Support\Facades\DB;
class ReportController extends Controller
{
public function generateReport()
{
DB::transaction(function () {
Transaction::cursor()
->filter(function ($transaction) {
return $transaction->amount > 1000;
})
->each(function ($transaction) {
// Process each large transaction
$this->processHighValueTransaction($transaction);
});
});
}
}
This implementation ensures efficient memory usage even when processing millions of records, making it perfect for background jobs and data processing tasks.
The post Managing Large Datasets in Laravel with LazyCollection appeared first on Laravel News.
Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.
Read more https://laravel-news.com/managing-large-datasets-in-laravel-with-lazycollection
The Laravel Mails package collects everything about sent emails in your Laravel app. When your app fails to deliver an email, it can be complicated to track down the culprit, or the email can fail invisibly. Using this package, you can surface mail issues, track trends, and get notified when something is wrong.
This package is highly configurable - check out the published configuration file for details on everything you can configure in this package.
If you are using Filament, the accompanying Filament Mails plugin can give you a dashboard to visualize important mail stats as well as investigate individual emails:
You can learn more about this package, get full installation instructions, and view the source code on GitHub. Also, check out the accompanying Filament mails plugin.
The post Collect and Monitor Everything About Sent Emails in Your Laravel App appeared first on Laravel News.
Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.
Read more https://laravel-news.com/laravel-mails-package
Page 2 of 1378